{"openapi":"3.0.3","info":{"title":"API de Importação - PLI","description":"Documentação do endpoint de recebimento de dados de PLI (Pedido de Liberação de Importação).","version":"1.0.0"},"paths":{"/inventory":{"get":{"tags":["developers"],"summary":"searches inventory","operationId":"searchInventory","description":"By passing in the appropriate options, you can search for\navailable inventory in the system\n","parameters":[{"in":"query","name":"searchString","description":"pass an optional search string for looking up inventory","required":false,"schema":{"type":"string"}},{"in":"query","name":"skip","description":"number of records to skip for pagination","schema":{"type":"integer","format":"int32","minimum":0}},{"in":"query","name":"limit","description":"maximum number of records to return","schema":{"type":"integer","format":"int32","minimum":0,"maximum":50}}],"responses":{"200":{"description":"search results matching criteria","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InventoryItem"}}}}},"400":{"description":"bad input parameter"}}},"post":{"tags":["admins"],"summary":"adds an inventory item","operationId":"addInventory","description":"Adds an item to the system","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryItem"}}},"description":"Inventory item to add"},"responses":{"201":{"description":"item created"},"400":{"description":"invalid input, object invalid"},"409":{"description":"an existing item already exists"}}}},"/api/pli/dados":{"post":{"summary":"Envia dados de cabeçalho e itens de uma PLI","operationId":"processarPli","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pli":{"type":"object","properties":{"cabecalho":{"type":"object","properties":{"inbound":{"type":"string","example":"180114973"},"urf_despacho":{"type":"integer","example":2931605},"cd_moeda":{"type":"integer","example":220},"cd_icoterm":{"type":"string","example":"FOB"},"vl_total":{"type":"number","format":"float","example":10542.51}}},"itens":{"type":"array","items":{"type":"object","properties":{"cd_part_number":{"type":"string","example":"1180050"},"cd_ncm":{"type":"string","example":"85365090"},"quantidade":{"type":"string","example":"47000.000000"},"vl_unitario":{"type":"string","example":"0.1064900"}}}}}}}}}}},"responses":{"200":{"description":"Sucesso ao processar a PLI","content":{"application/json":{"schema":{"type":"object","properties":{"sucesso":{"type":"boolean","example":true},"mensagem":{"type":"string","example":"Dados da PLI recebidos e processados com sucesso!"}}}}}},"400":{"description":"JSON malformado ou campos obrigatórios ausentes"},"405":{"description":"Método HTTP não permitido (Diferente de POST)."}}}}},"components":{"schemas":{"InventoryItem":{"type":"object","required":["id","name","manufacturer","releaseDate"],"properties":{"id":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"name":{"type":"string","example":"Widget Adapter"},"releaseDate":{"type":"string","format":"date-time","example":"2016-08-29T09:12:33.001Z"},"manufacturer":{"$ref":"#/components/schemas/Manufacturer"}}},"Manufacturer":{"type":"object","required":["name"],"properties":{"name":{"type":"string","example":"ACME Corporation"},"homePage":{"type":"string","format":"url","example":"https://www.acme-corp.com"},"phone":{"type":"string","example":"408-867-5309"}}}}}}