...
total | Quantidade de registros do retorno |
hasNext | Indica se há mais registros na próxima página |
syncing | Indica se no momento da requisição o sistema estava recebendo alguma nova informação |
lines | Contém as informações dos registros |
date | Data de emissão do documento de entrada |
number | Número do documento de entrada |
serial | Série do documento |
clientIdcustomerId | ID do cliente |
clientcustomer | Nome do cliente |
status | Status do documento. Cancelada ou Ativa. |
type | Tipo da nota. Podendo ser: NF.Normal, NF.Devolucao, NF.Complemento de Preco, NF.Complemento de ICMS, NF. Complemento de IPI, NF. Beneficiamento |
tpform | Indica se é formulário próprio ou de fornecedor. (Retorna true ou false) |
total | Valor total da nota |
status | Status do documento |
Formato específico para obtenção de documentos de entrada específicos
...
localhost/Purchase/000164 |
---|
{ "total": 23, "hasNext": false, "lines": [ { "date": "2012-09-11T00:00:0020120911", "number": "000003895", "serial": "001", "clientIdcustomerId": "000164", "clientcustomer": "TECNOLOGIA EM PLASTICOS IND E COM LTDA", "status": "NF. Ativa", "totaltype": 1217"NF.19Normal", "statustpform": 1, "total": 1217.19 }, { "date": "2012-09-26T00:00:0020120926", "number": "000003946", "serial": "001", "clientIdcustomerId": "000164", "clientcustomer": "TECNOLOGIA EM PLASTICOS IND E COM LTDA", "status": "NF. Ativa", "totaltype": 2606"NF.71Normal", "statustpform": 1, "total": 2606.71 }, { "date": "2012-10-26T00:00:0020121026", "number": "000004084", "serial": "001", "clientIdcustomerId": "000164", "clientcustomer": "TECNOLOGIA EM PLASTICOS IND E COM LTDA", "status": "NF. Ativa", "totaltype": 2130"NF.Normal", "statustpform": 1, "total": 2130 } ] } |
Realizando o filtro por série:
localhost/Purchase/000164/1 |
---|
{ "total": 14, "hasNext": false, "lines": [ { "date": "2014-03-20T00:00:0020140320", "number": "000005969", "serial": "1", "clientIdcustomerId": "000164", "clientcustomer": "TECNOLOGIA EM PLASTICOS IND E COM LTDA", "total "status": "NF. Ativa", "type": 4844"NF.83Normal", "statustpform": 1, "total": 4844.83 }, { "date": "2014-05-21T00:00:0020140521", "number": "000006111", "serial": "1", "clientIdcustomerId": "000164", "clientcustomer": "TECNOLOGIA EM PLASTICOS IND E COM LTDA", "total "status": "NF. Ativa", "type": 1777"NF.56Normal", "statustpform": 1, "total": 1777.56 }, { "date": "2014-06-23T00:00:0020140623", "number": "000006197", "serial": "1", "clientIdcustomerId": "000164", "clientcustomer": "TECNOLOGIA EM PLASTICOS IND E COM LTDA", "totalstatus": "NF. Ativa", "type": 3598"NF.2Normal", "statustpform": 1, "total": 3598.2 } ] } |
Realizando o filtro por número de documento
localhost/Purchase/000164/1/000005969 |
---|
{ "date": "2014-03-20T00:00:0020140320", "number": "000005969", "serial": "1", "clientIdcustomerId": "000164", "clientcustomer": "TECNOLOGIA EM PLASTICOS IND E COM LTDA", "status": "NF. Ativa", "type": "NF.Normal", "tpform": 1, "total": 4844.83 } |
Obtenção de itens de documentos de entrada específicos
localhost/Purchase/CódigoPessoa/Série/NúmeroDocumento/ITEMS |
---|
Exemplo:
localhost/Purchase/000164/1/000005969/ITEMS |
---|
{ "total": 2, "hasNext": false, "lines": [ { "id": "01", "productid": "04436", "product": "SC PL PP 13X21X6 GUARD VIP 14X14 1X1", "quantity": 105000, "price": 0.02378, "total": 2496.9, "lot": "", "storage": "03" }, "status { "id": "02", "productid": "04442", "product": "REEM 47X40X3 P GUARD 14X14 1X1", "quantity": 36200, "price": 0.06486, "total": 2347.93, "lot": "", "storage": "03" } ] } |
Exemplos de consultas e retornos com parâmetros
...
localhost/Purchase?inidate=2013-01-01&enddate=2013-01-08 |
---|
{ "total": 9, "hasNext": false, "lines": [ { "date": "2013-01-07T00:00:0020130107", "number": "000004511", "serial": "A", "clientIdcustomerId": "000041", "clientcustomer": "ANTONIO JOSE DA SILVA COMERCIO", "status": "NF. Ativa", "totaltype": 349"NF.99Normal", "statustpform": 1, "total": 349.99 }, { "date": "2013-01-03T00:00:0020130103", "number": "000048697", "serial": "A", "clientIdcustomerId": "000026", "clientcustomer": "C V NEIVA DE OLIVEIRA", "total": 17 "status": "NF. Ativa", "type": "NF.Normal", "statustpform": 1, "total": 17 }, { "date": "2013-01-08T00:00:0020130108", "number": "000048751", "serial": "A", "clientIdcustomerId": "000026", "clientcustomer": "C V NEIVA DE OLIVEIRA", "totalstatus": 7"NF. 8Ativa", "statustype": "NF.Normal", "tpform": 1, "total": 7.8 } ] } |
Exemplo 2: Retornando documentos de entrada por parte do nome do cliente
localhost/Purchase?customer=ANTONIO JOSE DA SILVA |
---|
{ "total": 15, "hasNext": false, "lines": [ { "date": "2013-01-07T00:00:0020130107", "number": "000004511", "serial": "A", "clientIdcustomerId": "000041", "clientcustomer": "ANTONIO JOSE DA SILVA COMERCIO", "totalstatus": 349"NF. 99Ativa", "statustype": "NF.Normal", "tpform": 1, "total": 349.99 }, { "date": "2014-02-20T00:00:0020140220", "number": "000004567", "serial": "A", "clientIdcustomerId": "000041", "clientcustomer": "ANTONIO JOSE DA SILVA COMERCIO", "status": "NF. Ativa", "totaltype": 36"NF.Normal", "statustpform": 1, "total": 36 }, { "date": "2014-02-27T00:00:0020140227", "number": "000004747", "serial": "A", "clientIdcustomerId": "000041", "clientcustomer": "ANTONIO JOSE DA SILVA COMERCIO", "totalstatus": "NF. Ativa", "type": 159"NF.5Normal", "statustpform": 1, "total": 159.5 } ] } |
Exemplo 3: Retornando documentos de entrada filtrando por parte da descrição do produto
localhost/Purchase?product=AGUA SANITARIA |
---|
{ "total": 34, "hasNext": false, "lines": [ { "date": "2012-10-31T00:00:0020121031", "number": "000048321", "serial": "U", "clientIdcustomerId": "000026", "clientcustomer": "C V NEIVA DE OLIVEIRA", "totalstatus": "NF. Ativa", "type": 118"NF.8Normal", "statustpform": 1, "total": 118.8 }, { "date": "2015-01-09T00:00:0020150109", "number": "000007793", "serial": "A", "clientIdcustomerId": "000026", "clientcustomer": "C V NEIVA DE OLIVEIRA", "status": "NF. Ativa", "totaltype": 53"NF.91Normal", "statustpform": 1, "total": 53.91 }, { "date": "2012-12-19T00:00:0020121219", "number": "000048636", "serial": "A", "clientIdcustomerId": "000026", "clientcustomer": "C V NEIVA DE OLIVEIRA", "status": "NF. Ativa", "totaltype": 96"NF.2Normal", "statustpform": 1, "total": 96.2 } ] } |
Exemplo 4: Retornando documentos de entrada ordenados por id do cliente em ordem decrescente
localhost/Purchase?order=clientid customerid desc |
---|
{ "total": 1017, "hasNext": false, "lines": [ { "date": "2014-12-24T00:00:0020141224", "number": "000148467", "serial": "U", "clientIdcustomerId": "000453", "clientcustomer": "AUTO PECAS PADRE CICERO", "status": "NF. Ativa", "totaltype": 120"NF.Complemento de Preco", "statustpform": 1, "total": 120 }, { "date": "2014-12-03T00:00:0020141203", "number": "000010025", "serial": "A", "clientIdcustomerId": "000452", "clientcustomer": "ADEMIR BOSSACO", "total": 5580 "status": "NF. Ativa", "type": "NF.Complemento de Preco", "statustpform": 1, "total": 5580 }, { "date": "2014-12-15T00:00:0020141215", "number": "000017841", "serial": "U", "clientIdcustomerId": "000452", "clientcustomer": "ADEMIR BOSSACO", "total": 7840 "status": "NF. Ativa", "type": "NF.Complemento de Preco", "statustpform": 1, "total": 7840 } ] } |
Exemplo 5: Retornando a página 20 com 3 registros por página
localhost/Purchase?max=3&page=20 |
---|
{ "total": 1017, "hasNext": true, "lines": [ { "date": "2012-09-11T00:00:0020140730", "number": "000001090000021287", "serial": "U", "customerId": "000161", "clientIdcustomer": "000019RAPIDO LONDON", "clientstatus": "NOVO PERFIL COMERCIO DE EMBALAGENS LTDANF. Ativa", "totaltype": 3940.5"NF.Complemento de Preco", "statustpform": 1, "total": 575.64 }, { "date": "2012-09-13T00:00:0020141014", "number": "000005502000030942", "serial": "1", "customerId": "000202", "clientIdcustomer": "000018INDUSTRIA BRASILEIRA DA EMBALAGEM", "clientstatus": "CIPEL DE PADUA IND DE PAPEIS LTDANF. Ativa", "totaltype": 30601"NF.87Normal", "statustpform": 1, "total": 5800.49 }, { "date": "2012-09-11T00:00:0020141011", "number": "000003895000016975", "serial": "0011", "clientIdcustomerId": "000164000313", "clientcustomer": "TECNOLOGIA EM PLASTICOS IND E COM LTDAKAPERSUL INDUSTRIA E COMERCIO DE PAPEIS S/A.", "status": "NF. Ativa", "totaltype": 1217"NF.19Normal", "statustpform": 1, "total": 31386.88 } ] } |