{"openapi":"3.0.0","servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/agroamazonia/aasa/v1"},{"description":"Protheus","url":"https://api.agroamazonia.com/api/aasa/v1"}],"info":{"version":"v1","title":"Agro Amazônia","description":"Endpoints Protheus para integração"},"security":[{"password":[]}],"paths":{"/cadastros/colaborador":{"post":{"tags":["cadastros"],"operationId":"atualizaCadastroColaboradores","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/POSTCadastroColaboradores"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Successful operation"}}}}}},"default":{"description":"Invalid data/request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Error occured while updating record. Verify 'details' property"},"details":{"type":"string","example":""}}}}}}}}},"/cadastros/colaborador/{idColaborador}":{"post":{"tags":["cadastros"],"operationId":"atualizaCadastroColaborador","parameters":[{"in":"path","name":"idColaborador","schema":{"type":"string","example":"00234212322"},"required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/POSTCadastroColaborador"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Successful operation"}}}}}},"default":{"description":"Invalid data/request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Error occured while updating record. Verify 'details' property"},"details":{"type":"string","example":""}}}}}}}}},"/fornecedor":{"get":{"tags":["fornecedor"],"operationId":"getFornecedores","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Fornecedores"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/fornecedor/{idFornecedor}":{"get":{"tags":["fornecedor"],"operationId":"getFornecedorById","parameters":[{"$ref":"#/components/parameters/idFornecedor"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Fornecedor"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/fornecedor/{idFornecedor}/loja":{"get":{"tags":["fornecedor"],"operationId":"getFornecedorLojas","parameters":[{"$ref":"#/components/parameters/idFornecedor"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LojasFornecedor"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/fornecedor/{idFornecedor}/loja/{idLoja}":{"get":{"tags":["fornecedor"],"operationId":"getFornecedorLojaById","parameters":[{"$ref":"#/components/parameters/idFornecedor"},{"$ref":"#/components/parameters/idLoja"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LojaFornecedor"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/healthcheck":{"get":{"operationId":"healthCheck","tags":["monitoramento"],"servers":[{"url":"https://api.agroamazonia.com/api"}],"parameters":[{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"}}}}}}}}},"/proprietario":{"get":{"operationId":"getProprietarios","tags":["fazenda"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proprietarios"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/proprietario/{idProprietario}":{"get":{"operationId":"getProprietarioById","tags":["fazenda"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proprietario"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/contasareceber/liberacao":{"post":{"operationId":"libJurDesc","tags":["financeiro"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"000454"},"aprovador":{"type":"string","example":"ciro.chagas"},"opcao":{"type":"string","enum":["liberacao","rejeicao"]},"percentual":{"type":"number","minimum":0,"maximum":100},"observacao":{"type":"string"}},"required":["aprovador","opcao","id"]}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"000454"},"message":{"type":"string","example":"Updated successful"},"body":{"type":"object"}}}}}},"400":{"description":"Invalid ID supplied"},"401":{"description":"Not allowed"},"404":{"description":"Record not found","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"string"},"example":["operation: fail to find \"id\" record"]}}}}}}}}},"/proprietario/{idProprietario}/credito":{"get":{"operationId":"getCredito","tags":["financeiro"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Creditos"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/proprietario/{idProprietario}/fazenda":{"get":{"operationId":"getFazendas","tags":["fazenda"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/xtype"},{"name":"entity","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Fazendas"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/proprietario/{idProprietario}/fazenda/{idFazenda}":{"get":{"operationId":"getFazendaById","tags":["fazenda"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/idFazenda"},{"$ref":"#/components/parameters/xtype"},{"name":"entity","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Fazenda"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/proprietario/{idProprietario}/fazenda/{idFazenda}/coordenadas":{"post":{"operationId":"postCoordenadas","tags":["fazenda"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/idFazenda"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"OK"},"details":{"type":"string"}}}}}},"default":{"description":"Invalid or failed operation","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Fail"},"details":{"type":"string"}}}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"latitude":{"type":"string","example":"-14,207135"},"longitude":{"type":"string","example":"-59,998608"}}}}}}}},"/proprietario/{idProprietario}/fazenda/{idFazenda}/barter":{"get":{"operationId":"getBarter","tags":["fazenda"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/idFazenda"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Barters"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/proprietario/{idProprietario}/fazenda/{idFazenda}/titulo":{"get":{"operationId":"getTitulos","tags":["financeiro"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/idFazenda"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Titulos"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/proprietario/{idProprietario}/fazenda/{idFazenda}/titulo/{idNotaFiscal}":{"get":{"operationId":"getTituloById","tags":["financeiro"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/idFazenda"},{"$ref":"#/components/parameters/idNotaFiscal"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Titulos"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/proprietario/{idProprietario}/fazenda/{idFazenda}/titulo/{idNotaFiscal}/{tipoAnexo}":{"get":{"operationId":"getTituloAnexo","tags":["financeiro"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/idFazenda"},{"$ref":"#/components/parameters/idNotaFiscal"},{"$ref":"#/components/parameters/tipoAnexo"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Anexo"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/proprietario/{idProprietario}/fazenda/{idFazenda}/consumo":{"get":{"operationId":"getConsumo","tags":["fazenda"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/idFazenda"},{"$ref":"#/components/parameters/dataDe"},{"$ref":"#/components/parameters/dataAte"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Consumo"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/proprietario/{idProprietario}/fazenda/{idFazenda}/estoque":{"get":{"operationId":"getEstoqueFazenda","tags":["fazenda"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/idFazenda"},{"name":"idProdutoPai","example":544,"in":"query","schema":{"$ref":"#/components/schemas/UniqueId"}},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Estoque"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/compra/ordem":{"post":{"tags":["compra"],"operationId":"createPurchaseOrder","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestPurchaseOrder"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseOKPurchaseOrder"}}}},"400":{"description":"Invalid data/request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseFailPurchaseOrder"}}}}}}},"/proposta":{"post":{"tags":["proposta"],"operationId":"createPropostaERP","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PostFertilizante"},{"$ref":"#/components/schemas/PostSemente"}],"discriminator":{"propertyName":"proposta.tipo"}}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proposta200"}}}},"400":{"description":"Invalid data/request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proposta404"}}}}}}},"/proprietario/{idProprietario}/fazenda/{idFazenda}/pedido":{"get":{"operationId":"getPedidos","tags":["pedidos"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/idFazenda"},{"$ref":"#/components/parameters/dataDe"},{"$ref":"#/components/parameters/dataAte"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pedidos"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/proprietario/{idProprietario}/fazenda/{idFazenda}/pedido/{idPedido}":{"get":{"operationId":"getPedidoById","tags":["pedidos"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/idFazenda"},{"$ref":"#/components/parameters/idPedido"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pedido"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/proprietario/{idProprietario}/fazenda/{idFazenda}/pedido/{idPedido}/{tipoAnexo}":{"get":{"operationId":"getPedidoAnexo","tags":["pedidos"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/idFazenda"},{"$ref":"#/components/parameters/idPedido"},{"$ref":"#/components/parameters/tipoAnexo"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Anexo"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/proprietario/{idProprietario}/fazenda/{idFazenda}/pedido/{idPedido}/notafiscal":{"get":{"operationId":"getNotasFiscais","tags":["notas fiscais"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/idFazenda"},{"$ref":"#/components/parameters/idPedido"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotasFicais"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/proprietario/{idProprietario}/fazenda/{idFazenda}/pedido/{idPedido}/notafiscal/{idNotaFiscal}":{"get":{"operationId":"getNotaFiscalById","tags":["notas fiscais"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/idFazenda"},{"$ref":"#/components/parameters/idPedido"},{"$ref":"#/components/parameters/idNotaFiscal"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotaFiscal"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/proprietario/{idProprietario}/fazenda/{idFazenda}/pedido/{idPedido}/notafiscal/{idNotaFiscal}/{tipoAnexo}":{"get":{"operationId":"getNotaFiscalAnexo","tags":["notas fiscais"],"parameters":[{"$ref":"#/components/parameters/idProprietario"},{"$ref":"#/components/parameters/idFazenda"},{"$ref":"#/components/parameters/idPedido"},{"$ref":"#/components/parameters/idNotaFiscal"},{"$ref":"#/components/parameters/tipoAnexo"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Anexo"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/ctv":{"get":{"operationId":"getCtvs","tags":["ctv"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"$ref":"#/components/parameters/xtype"},{"name":"entity","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CTVs"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/ctv/{idCtv}":{"get":{"operationId":"getCtvById","tags":["ctv"],"parameters":[{"$ref":"#/components/parameters/idCtv"},{"$ref":"#/components/parameters/xtype"},{"name":"entity","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CTV"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/ctv/{id}/meta":{"get":{"operationId":"getCtvMeta","tags":["ctv"],"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/dataDe"},{"$ref":"#/components/parameters/dataAte"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CTVMeta"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/atuacao":{"get":{"operationId":"getAtuacoes","tags":["cadastros - negócio"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Atuacoes"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/atuacao/{id}":{"get":{"operationId":"getAtuacaoById","tags":["cadastros - negócio"],"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Atuacao"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/categoria":{"get":{"operationId":"getCategorias","tags":["cadastros - negócio"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Categorias"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/categoria/{id}":{"get":{"operationId":"getCategoriaById","tags":["cadastros - negócio"],"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Categoria"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/municipio":{"get":{"operationId":"getMunicipios","tags":["cadastros"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Municipios"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/municipio/{id}":{"get":{"operationId":"getMunicipioById","tags":["cadastros"],"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Municipio"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/organizacao":{"get":{"operationId":"getOrganizacoes","tags":["cadastros"],"parameters":[{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Operação realizada com sucesso","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organizacao"}}}},"404":{"description":"Não encontrado nenhum registro válido"}}}},"/safra":{"get":{"operationId":"getSafras","tags":["cadastros - negócio"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Safras"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/safra/{id}":{"get":{"operationId":"getSafraById","tags":["cadastros - negócio"],"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Safra"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/segmento":{"get":{"operationId":"getSegmentos","tags":["cadastros - negócio"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Segmentos"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/segmento/{id}":{"get":{"operationId":"getSegmentoById","tags":["cadastros - negócio"],"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Segmento"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/unidademedida":{"get":{"tags":["cadastros"],"operationId":"getUnidadesMedida","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unidades"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/unidademedida/{id}":{"get":{"tags":["cadastros"],"operationId":"getUnidadesMedidaById","parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unidade"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/utilizacaoterra":{"get":{"operationId":"getUtilizacoesTerra","tags":["cadastros - negócio"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UtilizacaoTerras"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/utilizacaoterra/{id}":{"get":{"operationId":"getUtilizacaoTerraById","tags":["cadastros - negócio"],"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UtilizacaoTerra"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/semente/variedade":{"get":{"operationId":"getVariedades","tags":["sementes"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variedades"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/semente/variedade/{id}":{"get":{"operationId":"getVariedadeById","tags":["sementes"],"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variedade"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/semente/peneira":{"get":{"operationId":"getPeneiras","tags":["sementes"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Peneiras"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/semente/peneira/{id}":{"get":{"operationId":"getPeneiraById","tags":["sementes"],"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Peneira"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/semente/tratamento":{"get":{"operationId":"getTratamentos","tags":["sementes"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tratamentos"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/semente/tratamento/{id}":{"get":{"operationId":"getTratamentoById","tags":["sementes"],"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tratamento"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/produto":{"get":{"tags":["produto"],"operationId":"getProdutos","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"name":"idFilial","description":"Filial utilizada para filtrar estoque e preço","in":"query","example":"010101","schema":{"type":"string"}},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Produtos"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/produto/{id}":{"get":{"tags":["produto"],"operationId":"getProdutoById","parameters":[{"$ref":"#/components/parameters/id"},{"name":"idFilial","in":"query","example":"010101","schema":{"type":"string"}},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Produto"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/catalogo/produto":{"get":{"operationId":"getCatalogoProdutos","tags":["catalogo"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"name":"idFilial","description":"Filial utilizada para filtrar estoque e preço","in":"query","example":"010101","schema":{"type":"string"}},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogoProdutos"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/catalogo/produto/{id}":{"get":{"operationId":"getCatalogoProdutoById","tags":["catalogo"],"parameters":[{"$ref":"#/components/parameters/id"},{"name":"idFilial","in":"query","example":"010101","schema":{"type":"string"}},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogoProduto"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/catalogo/produto/{id}/{tipoAnexo}":{"get":{"operationId":"getCatalogoProdutoAnexo","tags":["catalogo"],"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/tipoAnexo"},{"name":"idFilial","in":"query","example":"010101","schema":{"type":"string"}},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Anexo"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/catalogo/servico":{"get":{"operationId":"getCatalogoServicos","tags":["catalogo"],"parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"},{"$ref":"#/components/parameters/referenceDate"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Servicos"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/catalogo/servico/{id}":{"get":{"operationId":"getCatalogoServicoById","tags":["catalogo"],"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Servico"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}},"/catalogo/servico/{id}/{tipoAnexo}":{"get":{"operationId":"getCatalogoServicoAnexo","tags":["catalogo"],"parameters":[{"$ref":"#/components/parameters/id"},{"$ref":"#/components/parameters/tipoAnexo"},{"$ref":"#/components/parameters/xtype"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Anexo"}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Record not found"},"405":{"description":"Validation exception"}}}}},"components":{"parameters":{"xtype":{"in":"header","name":"x-type","description":"Para ambientes de homologação, este header se torna necessário","schema":{"type":"string"}},"idFazenda":{"name":"idFazenda","in":"path","required":true,"schema":{"type":"string","maxLength":8,"minLength":8,"example":"00000501","description":"Fazenda/Loja do Cliente"}},"idFornecedor":{"name":"idFornecedor","in":"path","required":true,"schema":{"type":"string","maxLength":6,"minLength":6,"example":"000020","description":"Código do Fornecedor"}},"idLoja":{"name":"idLoja","in":"path","required":true,"schema":{"type":"string","maxLength":8,"minLength":8,"example":"00002002","description":"Loja"}},"idPedido":{"name":"idPedido","in":"path","required":true,"schema":{"type":"string","maxLength":12,"minLength":12,"example":"010102000932","description":"Pedido de Venda"}},"idNotaFiscal":{"name":"idNotaFiscal","in":"path","required":true,"schema":{"type":"string","maxLength":9,"minLength":9,"example":"000500234","description":"Nota Fiscal"}},"idProprietario":{"name":"idProprietario","in":"path","required":true,"schema":{"type":"string","maxLength":6,"minLength":6,"example":"000005","description":"Código do Cliente"}},"id":{"name":"id","in":"path","required":true,"schema":{"type":"string"}},"idCtv":{"name":"idCtv","in":"path","required":true,"description":"Este ID pode ser o código do CTV, e-mail ou CPF","schema":{"oneOf":[{"type":"string","format":"email"},{"type":"string","example":"12323433200","description":"CPF"},{"type":"string","example":"000020","description":"ID CTV"}]}},"tipoAnexo":{"name":"tipoAnexo","in":"path","required":true,"schema":{"type":"string","enum":["foto","bula","receituario","danfe","laudo","boleto"]}},"dataDe":{"name":"dataDe","in":"query","schema":{"type":"string","format":"date"}},"dataAte":{"name":"dataAte","in":"query","schema":{"type":"string","format":"date"}},"page":{"name":"page","in":"query","example":0,"schema":{"type":"integer"}},"pageSize":{"name":"pageSize","in":"query","schema":{"type":"integer"}},"referenceDate":{"name":"referenceDate","in":"query","schema":{"type":"string","format":"date"}}},"schemas":{"Organizacao":{"type":"object","properties":{"grupos":{"type":"array","items":{"type":"object","properties":{"grupoId":{"type":"string","example":"00"},"grupo":{"type":"string","example":"AGRO AMAZONIA"},"empresas":{"type":"array","items":{"type":"object","properties":{"empresaId":{"type":"string","example":"01"},"empresa":{"type":"string","example":"PRODUTOS AGROPECUARIOS S.A."},"unidades":{"type":"array","items":{"type":"object","properties":{"unidadeId":{"type":"string","example":"01"},"unidade":{"type":"string","example":"AGRONEGOCIOS"},"regionais":{"type":"array","items":{"type":"object","properties":{"regionalId":{"type":"string","example":"01"},"regional":{"type":"string","example":"BR 163"},"filiais":{"type":"array","items":{"type":"object","properties":{"filialId":{"$ref":"#/components/schemas/FilialId"},"filial":{"type":"string","example":"SORRISO"}}}}}}}}}}}}}}}}}},"User":{"type":"string","example":"user.name"},"DefaultSystem":{"type":"object","properties":{"sysCreatedOn":{"type":"string","format":"date"},"sysCreatedBy":{"$ref":"#/components/schemas/User"},"sysUpdatedAt":{"type":"string","format":"date"},"sysUpdatedBy":{"$ref":"#/components/schemas/User"}}},"Creditos":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Credito"}}}},"Credito":{"type":"object","properties":{"total":{"type":"number"},"utilizado":{"type":"number"},"idSafra":{"$ref":"#/components/schemas/UniqueId"}}},"Cultura":{"type":"object","properties":{"idCultura":{"$ref":"#/components/schemas/UniqueId"},"cultura":{"type":"string","example":"SOJA"}}},"Safras":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Safra"}}}},"Safra":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/DefaultSystem"},"idSafra":{"$ref":"#/components/schemas/UniqueId"},"descricao":{"type":"string","example":"SOJA - AGRICOLA 2021/2022"},"dataDe":{"type":"string","format":"date"},"dataAte":{"type":"string","format":"date"},"cultura":{"$ref":"#/components/schemas/Cultura"}}},"Barters":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Barter"}}}},"Barter":{"type":"object","properties":{"total":{"type":"number"},"entregue":{"type":"number"},"entregueRomaneio":{"type":"number"},"idSafra":{"$ref":"#/components/schemas/UniqueId"}}},"Titulos":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Titulo"}}}},"Titulo":{"type":"object","properties":{"idSafra":{"$ref":"#/components/schemas/UniqueId"},"idFilial":{"$ref":"#/components/schemas/FilialId"},"numeroTitulo":{"type":"string","example":"000234110"},"parcela":{"type":"string","example":"02"},"emissao":{"type":"string","format":"date"},"tipoProduto":{"type":"string","enum":["produto","serviço"]},"valor":{"type":"number"},"vencimento":{"type":"string","format":"date"},"moeda":{"type":"string","enum":["Real","Dólar"]},"links":{"type":"array","items":{"type":"object","properties":{"elemento":{"type":"string","enum":["boleto"]},"url":{"type":"string","format":"url","example":"/proprietario/000005/fazenda/00000501/titulo/000032357/boleto"}}}},"valorTotal":{"type":"number"},"situacao":{"type":"string","enum":["aberto","fechado","atrasado"]}}},"Consumo":{"type":"object","properties":{"dataDe":{"type":"string","format":"date"},"dataAte":{"type":"string","format":"date"},"consumoSafra":{"type":"array","items":{"type":"object","properties":{"idSafra":{"$ref":"#/components/schemas/UniqueId"},"safra":{"type":"string","example":"SOJA 2022/2023"},"segmentos":{"type":"array","items":{"type":"object","properties":{"idSegmento":{"$ref":"#/components/schemas/UniqueId"},"produtos":{"type":"array","items":{"type":"object","properties":{"codigoProdutoPai":{"type":"string","example":"9CL"},"produtoPai":{"type":"string","example":"hero"},"consumoTotal":{"type":"object","properties":{"quantidade":{"type":"number"},"valorReal":{"type":"number"}}}}}}}}}}}}}},"Fazendas":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Fazenda"}}}},"Fornecedor":{"type":"object","properties":{"idFornecedor":{"$ref":"#/components/schemas/UniqueId"},"fornecedor":{"type":"string","example":"DAGMA"},"lojas":{"type":"array","items":{"$ref":"#/components/schemas/LojaFornecedor"}}}},"Fornecedores":{"allOf":[{"$ref":"#/components/schemas/Paginacao"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Fornecedor"}}}}]},"LojasFornecedor":{"allOf":[{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LojaFornecedor"}}}}]},"LojaFornecedor":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/DefaultSystem"},"idFornecedor":{"$ref":"#/components/schemas/UniqueId"},"idLoja":{"$ref":"#/components/schemas/UniqueId"},"fornecedor":{"type":"string","example":"DAGMA"},"cgc":{"type":"string","minLength":11,"maxLength":14,"example":"12500435000198"},"municipio":{"type":"string","example":"CAMPINAS"},"estado":{"type":"string","example":"SP","minLength":2,"maxLength":2,"pattern":"/[A-Z]/"},"ibge":{"type":"string","minLength":5,"maxLength":7,"example":"3509502"},"ativo":{"type":"boolean","default":true,"description":"Campo utilizado para indicar se o registro no Protheus está ativo ou não"}}},"Proprietarios":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Proprietario"}}}},"ResponseOKPurchaseOrder":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"000000000000001"},"message":{"type":"string","example":"insert/update was successful"}}}}},"ResponseFailPurchaseOrder":{"type":"object","properties":{"data":{"type":"object","properties":{"error":{"type":"string","example":"Error occule while inserting/updating record. Verifiy required fields"}}}}},"RequestPurchaseOrder":{"required":["idPurchaseOrder","sysIdPurchaseOrder","type","option","state","system","items"],"type":"object","properties":{"idPurchaseOrder":{"type":"string","example":"PO0000001"},"sysIdPurchaseOrder":{"type":"string","example":"db49a8ec1beda110b0e143bbe54bcbdd"},"type":{"example":"mae","type":"string","enum":["mae","spot"]},"option":{"example":"insert","type":"string","enum":["insert","update"]},"status":{"type":"string","example":"approved"},"system":{"$ref":"#/components/schemas/DefaultSystem"},"comentarios":{"type":"string"},"items":{"type":"array","items":{"minItems":1,"required":["idPurchaseOrder","sysIdPurchaseOrder","system","idFilial","idFornecedor","idProduto","quantidade","valorUnitario","valorTotal","moeda","dataPagamento"],"type":"object","properties":{"idPurchaseOrderLine":{"type":"string","example":"POL0000001"},"sysIdPurchaseOrderLine":{"type":"string","example":"db49a8ec1beda110b0e143bbe54bcbdd"},"system":{"$ref":"#/components/schemas/DefaultSystem"},"idFilial":{"type":"string","example":"010102"},"idFornecedor":{"type":"string","example":"00000501"},"idProduto":{"type":"string","example":"00600006TN00010"},"quantidade":{"type":"number","example":23,"minimum":0},"valorUnitario":{"type":"number","example":50,"minimum":0},"valorTotal":{"type":"number","example":1150,"minimum":0},"moeda":{"type":"string","example":"Real","enum":["Real","Dólar"]},"dataPagamento":{"type":"string","format":"date"},"comentarios":{"type":"string"}}}}}},"Proposta200":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"000029"},"message":{"type":"string","example":"insert was successful."}}}}},"Proposta404":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string","example":"Error occured while inserting record. Verify Required Fields"}}}}},"POSTCadastroColaboradores":{"type":"object","properties":{"colaboradores":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Identificador do colaborador","example":"00234212322"},"data":{"$ref":"#/components/schemas/POSTCadastroColaborador"}}}}}},"POSTCadastroColaborador":{"type":"object","properties":{"endereco":{"type":"object","properties":{"rua":{"type":"string","example":"Rua 02"},"numero":{"type":"string","example":"886"},"bairro":{"type":"string","example":"Centro"},"codMunicipio":{"type":"string","example":"03403"},"municipio":{"type":"string","example":"Cuiaba"},"estado":{"type":"string","example":"MT"},"complemento":{"type":"string","example":"Condominio Alvorada, Casa 23"},"cep":{"type":"string","example":"78000000"}}},"telefone":{"type":"string","example":"999990231"},"ddd":{"type":"string","example":"65"},"email":{"type":"string","format":"email"}}},"PostSemente":{"type":"object","required":["tipo","proposta","codFilial","codSafra","codVendedor","dataPagamento","dataEntrega","moeda","barter","tipoGarantia","tipoEntrega","observacao","itens"],"properties":{"proposta":{"required":["id","status"],"type":"object","properties":{"id":{"type":"number","example":22},"tipo":{"type":"string","example":"semente"},"status":{"type":"string","example":"em_alocacao"}}},"modalidade":{"type":"string","enum":["A vista","A prazo"]},"codFilial":{"type":"string","example":"010104"},"codSafra":{"type":"string","example":"000000000000035"},"codVendedor":{"type":"string","example":"V00010"},"dataPagamento":{"type":"array","items":{"type":"object","required":["data","percentual"],"properties":{"data":{"type":"string","example":"2023-02-22"},"percentual":{"type":"number","example":100}}}},"dataEntrega":{"type":"string","example":"2023-02-28"},"moeda":{"type":"number","example":1},"barter":{"type":"boolean","example":false},"tipoGarantia":{"type":"string","example":"Duplicata"},"tipoEntrega":{"type":"string","example":"CIF"},"observacao":{"type":"string","example":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non vehicula elit, id scelerisque ipsum. Nullam pulvinar libero ac neque eleifend, quis pharetra libero tristique. Ut feugiat elementum urna, ut finibus quam lobortis in. Aliquam gravida vestibulum fermentum. Nulla velit nisi, mattis quis convallis quis, lobortis et risus. Cras at rhoncus velit, eget consectetur enim. Nam posuere quis tortor ut porttitor."},"itens":{"type":"array","items":{"type":"object","required":["codProduto","codVariedade","codTratamento","codPeneira","quantidade","valorUnitario","valorTotal","codFazenda"],"properties":{"codProduto":{"type":"string","example":"00600006TN00010"},"codVariedade":{"type":"string","example":"AS"},"codTratamento":{"type":"string","example":"02"},"codPeneira":{"type":"string","example":"099"},"quantidade":{"type":"number","example":23},"valorUnitario":{"type":"number","example":50},"valorTotal":{"type":"number","example":1150},"codFazenda":{"type":"string","example":"02345100"}}}}}},"PostFertilizante":{"type":"object","required":["tipo","proposta","codFilial","codSafra","codVendedor","dataPagamento","dataEntrega","moeda","barter","tipoGarantia","tipoEntrega","observacao","itens"],"properties":{"proposta":{"required":["id","status"],"type":"object","properties":{"id":{"type":"number","example":22},"tipo":{"type":"string","example":"fertilizante"},"status":{"type":"string","example":"em_alocacao"}}},"modalidade":{"type":"string","enum":["A vista","A prazo"]},"codFilial":{"type":"string","example":"010104"},"codSafra":{"type":"string","example":"000000000000035"},"codVendedor":{"type":"string","example":"V00010"},"dataPagamento":{"type":"array","items":{"type":"object","required":["data","percentual"],"properties":{"data":{"type":"string","example":"2023-09-02"},"percentual":{"type":"number","example":0}}}},"dataEntrega":{"type":"string","example":"2023-02-28"},"moeda":{"type":"number","example":1},"tipoGarantia":{"type":"string","example":"Duplicata"},"tipoEntrega":{"type":"string","enum":["CIF","FOB"]},"kmAdicional":{"type":"number","example":244},"municipio":{"type":"string","example":"Alta Floresta"},"observacao":{"type":"string","example":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec non vehicula elit, id scelerisque ipsum. Nullam pulvinar libero ac neque eleifend, quis pharetra libero tristique. Ut feugiat elementum urna, ut finibus quam lobortis in. Aliquam gravida vestibulum fermentum. Nulla velit nisi, mattis quis convallis quis, lobortis et risus. Cras at rhoncus velit, eget consectetur enim. Nam posuere quis tortor ut porttitor."},"itens":{"type":"array","items":{"type":"object","required":["codProduto","codVariedade","codTratamento","codPeneira","quantidade","valorUnitario","valorTotal","codFazenda"],"properties":{"codProduto":{"type":"string","example":"00600006TN00010"},"valorFrete":{"type":"number","example":243},"codigoCampanha":{"type":"string","example":"929838"},"fornecedor":{"type":"string","example":"000115"},"quantidade":{"type":"number","example":23},"valorUnitario":{"type":"number","example":50},"valorTotal":{"type":"number","example":1150},"codFazenda":{"type":"string","example":"02345100"},"observacao":{"type":"string","example":"consectetur adipiscing"},"status":{"type":"string","example":""}}}}}},"Pedidos":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Pedido"}}}},"Pedido":{"type":"object","properties":{"idFilial":{"$ref":"#/components/schemas/FilialId"},"pedidos":{"type":"array","items":{"type":"object","properties":{"idPedido":{"type":"string","example":"010101000332","minLength":12,"maxLength":12},"moeda":{"type":"string","enum":["Real","Dólar"]},"tipoPedido":{"type":"array","items":{"type":"string","enum":["produto","serviço"]}},"idProdutoServico":{"type":"array","items":{"$ref":"#/components/schemas/UniqueId"}},"statusPedido":{"type":"string","enum":["aberto","finalizado"]},"dataPedido":{"type":"string","format":"date"},"valorPedido":{"type":"number"},"vencimento":{"type":"string","format":"date"},"links":{"type":"array","items":{"type":"object","properties":{"elemento":{"type":"string","enum":["receituario","laudo"]},"url":{"type":"string","format":"url","example":"/servico/AV100010UN00010/foto"}}},"example":[{"elemento":"receituario","url":"/proprietario/000005/fazenda/00000500/pedido/000001/receituario"},{"elemento":"laudo","url":"/proprietario/000005/fazenda/00000500/pedido/000001/laudo"}]},"notasFiscais":{"$ref":"#/components/schemas/NotasFicais"}}}}}},"NotasFicais":{"type":"object","properties":{"items":{"$ref":"#/components/schemas/NotaFiscal"}}},"NotaFiscal":{"type":"object","properties":{"idNfe":{"$ref":"#/components/schemas/UniqueId"},"dataEntrega":{"type":"string","format":"date"},"links":{"type":"array","items":{"type":"object","properties":{"elemento":{"type":"string","enum":["danfed"]},"url":{"type":"string","format":"url","example":"/servico/AV100010UN00010/foto"}}},"example":[{"elemento":"danfe","url":"/proprietario/000005/fazenda/00000500/pedido/000001/notafiscal/000234200/danfe"}]}}},"Estoque":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"idFilial":{"$ref":"#/components/schemas/FilialId"},"idProdutoPai":{"$ref":"#/components/schemas/UniqueId"},"produtoPai":{"type":"string","example":"HERO"},"embalagem":{"type":"string","example":"LTs"},"qtdDisponivel":{"type":"number"}}}}}},"Fazenda":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/DefaultSystem"},"idProprietario":{"$ref":"#/components/schemas/ProprietarioId"},"idFazenda":{"$ref":"#/components/schemas/FazendaId"},"nomeFazenda":{"type":"string","example":"FAZENDA TRES MARIAS"},"idCtv":{"$ref":"#/components/schemas/UniqueId"},"email":{"type":"string","format":"email"},"area":{"type":"array","items":{"type":"object","properties":{"tipo":{"type":"string","enum":["areaFazenda","areaProdutivaSoja","areaProdutivaMilho","areaProdutivaPastagem","cabecasGado"]},"valor":{"type":"number"}}},"example":[{"tipo":"areaFazenda","valor":4000},{"tipo":"areaProdutivaSoja","valor":2500},{"tipo":"areaProdutivaMilho","valor":2000},{"tipo":"areaProdutivaPastagem","valor":1000},{"tipo":"cabecasGado","valor":500}]},"idsAtuacao":{"type":"array","items":{"$ref":"#/components/schemas/UniqueId"}},"idsUtilizacaoTerra":{"type":"array","items":{"$ref":"#/components/schemas/UniqueId"}},"endereco":{"type":"object","properties":{"codMunicipio":{"type":"string","minLength":7,"maxLength":7,"example":"5103403"},"municipio":{"type":"string","example":"CUIABÁ"},"estado":{"title":"string","example":"MT"},"logradouro":{"type":"string","example":"Rua 1"},"numero":{"type":"number","example":999},"CEP":{"type":"string","format":"zip","example":"00000000"}}},"rota":{"type":"string","example":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus consectetur velit non pretium pellentesque. Cras condimentum libero non erat fermentum lobortis. Cras feugiat venenatis justo, id facilisis leo finibus in. Etiam sed metus in magna laoreet cursus non eget ex. Proin sodales aliquam nibh, rutrum rutrum risus molestie id. Maecenas id nulla id ex tristique venenatis. Ut vel blandit erat, in hendrerit nunc. Aliquam pulvinar pretium mi in lacinia. Fusce eu metus vitae orci ornare lobortis."},"coordenadas":{"type":"object","properties":{"latitude":{"type":"string"},"longitude":{"type":"string"}}},"cpf":{"type":"string","minLength":11,"maxLength":11,"example":"00000000000"},"cnpj":{"type":"string","minLength":14,"maxLength":14,"example":"00000000000000"},"proprietario":{"type":"object","description":"Este objeto só aparecerá caso ","properties":{"idProprietario":{"$ref":"#/components/schemas/ProprietarioId"},"nome":{"type":"string","example":"JOÃO FERREIRA"},"clienteAa":{"type":"boolean"}}},"ctv":{"$ref":"#/components/schemas/CTV"}}},"Proprietario":{"type":"object","properties":{"idProprietario":{"$ref":"#/components/schemas/ProprietarioId"},"nome":{"type":"string","example":"JOÃO FERREIRA"},"clienteAa":{"type":"boolean"},"fazendas":{"type":"array","items":{"type":"object","properties":{"idFazenda":{"$ref":"#/components/schemas/FazendaId"},"nomeFazenda":{"type":"string","example":"FAZENDA TRES MARIAS"},"cpf":{"type":"string","minLength":11,"maxLength":11,"example":"00000000000"},"cnpj":{"type":"string","minLength":14,"maxLength":14,"example":"00000000000000"},"system":{"$ref":"#/components/schemas/DefaultSystem"}}}}}},"CTVs":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/CTV"}}}},"CTV":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/DefaultSystem"},"cpfCtv":{"type":"string","example":"00000000000"},"nomeCtv":{"type":"string","example":"JOSE VENDEDOR"},"idFilial":{"$ref":"#/components/schemas/FilialId"},"idCtv":{"$ref":"#/components/schemas/UniqueId"},"email":{"type":"string","format":"email","example":"jose.dias@agroamazonia.com"},"telefone":{"type":"string","example":"065999999999"},"filial":{"type":"object","properties":{"filialId":{"$ref":"#/components/schemas/FilialId"},"filial":{"type":"string","example":"SORRISO"}}}}},"CTVMeta":{"type":"object","properties":{"meta":{"type":"object","properties":{"dataDe":{"type":"string","format":"date"},"dataAte":{"type":"string","format":"date"},"metaSegmento":{"type":"array","items":{"type":"object","properties":{"idSegmento":{"$ref":"#/components/schemas/UniqueId"},"valorMeta":{"type":"number"},"realizado":{"type":"object","properties":{"produto":{"type":"number"},"servico":{"type":"number"}}},"emCarteira":{"type":"object","properties":{"produto":{"type":"object","properties":{"dolar":{"type":"number"},"real":{"type":"number"}}},"servico":{"type":"object","properties":{"dolar":{"type":"number"},"real":{"type":"number"}}}}}}}}}}}},"Segmentos":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Segmento"}}}},"Segmento":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/DefaultSystem"},"idSegmento":{"$ref":"#/components/schemas/UniqueId"},"descricao":{"type":"string","example":"AGROQUÍMICOS"}}},"Atuacoes":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Atuacao"}}}},"Atuacao":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/DefaultSystem"},"idAtuacao":{"$ref":"#/components/schemas/UniqueId"},"descricao":{"type":"string","example":"AGRÍCOLA"}}},"Paginacao":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"}}},"Unidades":{"allOf":[{"$ref":"#/components/schemas/Paginacao"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Unidade"}}}}]},"Unidade":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/DefaultSystem"},"unidadeId":{"$ref":"#/components/schemas/UniqueId"},"unidade":{"type":"string","example":"Balde"}}},"UtilizacaoTerras":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/UtilizacaoTerra"}}}},"UtilizacaoTerra":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/DefaultSystem"},"idUtilizacaoTerra":{"$ref":"#/components/schemas/UniqueId"},"descricao":{"type":"string","example":"SOJA"}}},"Culturas":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Cultura"},"example":[{"idCultura":"000001","cultura":"SOJA"},{"idCultura":"000002","cultura":"ALGODAO"},{"idCultura":"000003","cultura":"MILHO SAFRINHA"},{"idCultura":"000004","cultura":"PECUARIA"},{"idCultura":"000005","cultura":"MILHO"}]}}},"Variedades":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Variedade"}}}},"Variedade":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/DefaultSystem"},"idVariedade":{"$ref":"#/components/schemas/UniqueId"},"descricao":{"type":"string","example":"TMG 2185 IPRO"},"categoria":{"$ref":"#/components/schemas/Categoria"}}},"Categorias":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Categoria"}}}},"Categoria":{"type":"object","properties":{"idCategoria":{"type":"string","example":"00004"},"categoria":{"type":"string","example":"SEMENTES SOJA MULTIMARCAS"},"segmento":{"$ref":"#/components/schemas/Segmento"},"system":{"$ref":"#/components/schemas/DefaultSystem"}}},"Municipios":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Municipio"}}}},"Municipio":{"type":"object","properties":{"estado":{"type":"string","example":"MT"},"municipio":{"type":"string","example":"CUIABA"},"codIBGE":{"type":"string","example":"03403"},"system":{"$ref":"#/components/schemas/DefaultSystem"}}},"Peneiras":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Peneira"}}}},"Peneira":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/DefaultSystem"},"idPeneira":{"$ref":"#/components/schemas/UniqueId"},"descricao":{"type":"string","example":"P1"}}},"Tratamentos":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Tratamento"}}}},"Tratamento":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/DefaultSystem"},"idTratamento":{"$ref":"#/components/schemas/UniqueId"},"descricao":{"type":"string","example":"DERMACOR"}}},"Produtos":{"allOf":[{"$ref":"#/components/schemas/Paginacao"},{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Produto"}}}}]},"Produto":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/DefaultSystem"},"idProduto":{"$ref":"#/components/schemas/UniqueId"},"descricao":{"type":"string","example":"TORDON XT"},"principioAtivo":{"type":"string","example":"2,4-D e Aminopiralide"},"segmento":{"$ref":"#/components/schemas/Segmento"},"fornecedores":{"type":"array","items":{"$ref":"#/components/schemas/LojaFornecedor"}},"embalagem":{"type":"object","properties":{"fatorConversao":{"type":"string","example":"M","enum":["M","D"],"description":"M-Multiplicação, D-Divisão"},"conversao":{"type":"number","example":5},"primeiraUnidade":{"$ref":"#/components/schemas/Unidade"},"segundaUNidade":{"$ref":"#/components/schemas/Unidade"}}},"links":{"type":"array","items":{"type":"object","properties":{"elemento":{"type":"string","enum":["foto","bula"]},"url":{"type":"string","format":"url","example":"/servico/AV100010UN00010/foto"}}}},"marca":{"type":"string","example":"DOW"},"estoque":{"type":"array","items":{"type":"object","properties":{"idFilial":{"$ref":"#/components/schemas/UniqueId"},"qtdEstoque":{"type":"number"}}}},"preco":{"type":"array","items":{"type":"object","properties":{"idFilial":{"$ref":"#/components/schemas/UniqueId"},"preco":{"type":"number"}}}},"semente":{"type":"object","properties":{"variedade":{"$ref":"#/components/schemas/Variedade"},"tratamento":{"$ref":"#/components/schemas/Tratamento"}}}}},"CatalogoProdutos":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/CatalogoProduto"}}}},"CatalogoProduto":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/DefaultSystem"},"idProduto":{"$ref":"#/components/schemas/UniqueId"},"descricao":{"type":"string","example":"TORDON XT"},"principioAtivo":{"type":"string","example":"2,4-D e Aminopiralide"},"idSegmento":{"$ref":"#/components/schemas/UniqueId"},"links":{"type":"array","items":{"type":"object","properties":{"elemento":{"type":"string","enum":["foto","bula"]},"url":{"type":"string","format":"url","example":"/servico/AV100010UN00010/foto"}}}},"marca":{"type":"string","example":"DOW"},"estoque":{"type":"array","items":{"type":"object","properties":{"idFilial":{"$ref":"#/components/schemas/UniqueId"},"qtdEstoque":{"type":"number"}}}},"preco":{"type":"array","items":{"type":"object","properties":{"idFilial":{"$ref":"#/components/schemas/UniqueId"},"preco":{"type":"number"}}}}}},"Servicos":{"type":"object","properties":{"hasnext":{"type":"boolean"},"page":{"type":"number"},"pagesize":{"type":"number"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Servico"}}}},"Servico":{"type":"object","properties":{"system":{"$ref":"#/components/schemas/DefaultSystem"},"idServico":{"$ref":"#/components/schemas/UniqueId"},"descricao":{"type":"string","example":"MAPEAMENTO DE FERTILIDADE DO SOLO"},"links":{"type":"array","items":{"type":"object","properties":{"elemento":{"type":"string","enum":["foto"]},"url":{"type":"string","format":"url","example":"/servico/AV100010UN00010/foto"}}}},"caracteristica":{"type":"string","example":"MAPEAR OS ATRIBUTOS QUÍMICOS E/OU FÍSICOS DO SOLO, A PARTIR DE COLETA DE AMOSTRAS, ANÁLISES LABORATORIAIS E PROCESSAMENTO DOS RESULTADOS, COM SEGURANÇA E AGILIDADE."}}},"Anexo":{"type":"object","properties":{"entidade":{"type":"string","enum":["produto","servico","laudo","danfe","receituario"]},"id":{"$ref":"#/components/schemas/UniqueId"},"anexos":{"type":"array","items":{"type":"object","properties":{"arquivo":{"type":"string","example":"bula_AV100010UN00010_001.pdf"},"base64":{"type":"string","format":"base64","example":"QnVsYSBkbyBQcm9kdXRv"}}}}}},"UniqueId":{"type":"string","example":"000000001"},"FazendaId":{"type":"string","example":"00000501","minLength":8,"maxLength":8,"description":"Loja/Fazenda do Cliente"},"ProprietarioId":{"type":"string","example":"000005","minLength":6,"maxLength":6,"description":"Código do Cliente"},"FilialId":{"type":"string","example":"010101"}},"securitySchemes":{"password":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.agroamazonia.com/t/api/oauth2/token","scopes":{}}}}}}}