...
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 pedido de venda |
orderid | Número do pedido de venda |
clientId | ID do cliente |
client | Nome do cliente |
sellerid | ID do vendedor |
seller | Nome do vendedor |
state | UF de destino |
total | Valor total da nota |
status | Status do pedido |
...
{ "date": "2012-09-08T00:00:00", "orderId": "000005", "clientId": "000133", "client": "M H DE SOUZA FRANCO", "sellerId": "000004", "seller": "MARCIO PEREIRA PASSOS REPRESENTACOES LTDA", "state": "", "total": 5725, "status": "3" } |
Obtenção de itens de pedidos de venda específicos
localhost/Order/CodigoPedido//ITEMS |
---|
Exemplo:
localhost/Order/000005/ITEMS |
---|
{ "total": 2, "hasNext": false, "lines": [ { "id": "01", "productid": "00316", "product": "VIP P TOALHA INTERFOLHA BCO 20X21CM 1X1000", "quantity": 500, "price": 4.45, "total": 2225, "lot": "", "storage": "01" }, { "id": "02", "productid": "00874", "product": "VIP P TOALHA INTERFOLHA CRE 20X21CM 1X1000", "quantity": 1000, "price": 3.5, "total": 3500, "lot": "", "storage": "01" } ] } |
Exemplos de consultas e retornos com parâmetros
...
localhost/Order?sellers=000001,000004,000026 |
---|
{ "total": 11471152, "hasNext": false, "syncing": false, "lines": [ { "date": "2014-01-21T00:00:0020120908", "orderId": "003333000005", "clientIdcustomerId": "000370000133", "clientcustomer": "HOSPITAL UNIMED TERESINA S S LTDAM H DE SOUZA FRANCO", "sellerId": "000026000004", "seller": "C V NEIVA DE OLIVEIRAMARCIO PEREIRA PASSOS REPRESENTACOES LTDA", "state": "MA", "total": 21455725, "status": "3Orçamento de Venda" }, { "date": "2014-02-10T00:00:0020120912", "orderId": "003523000035", "clientIdcustomerId": "000378000073", "clientcustomer": "INSTITUTO TECNOLOGICO DE AVALIACAO DO CORACAO SSMARCELO ASSUNCAO SILVA", "sellerId": "000026000004", "seller": "C V NEIVA DE OLIVEIRAMARCIO PEREIRA PASSOS REPRESENTACOES LTDA", "state": "MA", "total": 1918150.35, "status": "3Faturado" }, { "date": "2014-02-20T00:00:0020120912", "orderId": "003631000040", "clientIdcustomerId": "000370000073", "clientcustomer": "HOSPITAL UNIMED TERESINA S S LTDAMARCELO ASSUNCAO SILVA", "sellerId": "000026000004", "seller": "C V NEIVA DE OLIVEIRAMARCIO PEREIRA PASSOS REPRESENTACOES LTDA", "state": "MA", "total": 1450602, "status": "3Faturado" } ] } |
Exemplo 2: Retornando pedidos de venda buscando pelo nome do cliente
localhost/Order?customer=NOLECON COM DE |
---|
{ "total": 4, "hasNext": false, "syncing": false, "lines": [ { "date": "2012-10-23T00:00:0020121023", "orderId": "000319", "clientIdcustomerId": "000149", "clientcustomer": "NOLECON COM DE MAT DE LIMPEZA", "sellerId": "000004", "seller": "MARCIO PEREIRA PASSOS REPRESENTACOES LTDA", "state": "MA", "total": 1420, "status": "3Faturado" }, { "date": "2012-12-07T00:00:0020121207", "orderId": "000603", "clientIdcustomerId": "000149", "clientcustomer": "NOLECON COM DE MAT DE LIMPEZA", "sellerId": "000004", "seller": "MARCIO PEREIRA PASSOS REPRESENTACOES LTDA", "state": "MA", "total": 1775, "status": "3Faturado" }, { "date": "2013-01-12T00:00:0020130112", "orderId": "000779", "clientIdcustomerId": "000149", "clientcustomer": "NOLECON COM DE MAT DE LIMPEZA", "sellerId": "000004", "seller": "MARCIO PEREIRA PASSOS REPRESENTACOES LTDA", "state": "MA", "total": 897.5, "status": "3Faturado" } ] } |
Exemplo 3: Retornando pedidos de venda em ordem decrescente de número
localhost/Order?order=orderid desc |
---|
{ "total": 53895394, "hasNext": false, "syncing": false, "lines": [ { "date": "2015-01-26T00:00:0020150313", "orderId": "0060922373", "clientIdcustomerId": "000026", "clientcustomer": "C V NEIVA DE OLIVEIRA", "sellerId": "000001", "seller": "CARLOS VINICIUS NEIVA DE OLIVEIRA", "state": "PI", "total": 21019.78, "status": "3Cancelado" }, { "date": "2015-01-26T00:00:0020150313", "orderId": "0060912372", "clientIdcustomerId": "000083000001", "clientcustomer": "T R DE S MACEDOCARLOS VINICIUS NEIVA DE OLIVEIRA", "sellerId": "000002000001", "seller": "MARCELINA DOS SANTOS BEZERRACARLOS VINICIUS NEIVA DE OLIVEIRA", "state": "PI", "total": 41118.44, "status": "3Cancelado" }, { "date": "2015-01-26T00:00:0020150313", "orderId": "0060902371", "clientIdcustomerId": "000058000001", "clientcustomer": "ASSOCIACAO PIAUIENSE DE COMBATE AO CANCERCARLOS VINICIUS NEIVA DE OLIVEIRA", "sellerId": "000002000001", "seller": "MARCELINA DOS SANTOS BEZERRACARLOS VINICIUS NEIVA DE OLIVEIRA", "state": "PI", "total": 444018.44, "status": "1Cancelado" } ] } |
Exemplo 4: Retornando a página 20 com 3 registros por página
localhost/Order?max=3&page=20 |
---|
{ "total": 53895394, "hasNext": true, "syncing": false, "lines": [ { "date": "2014-08-15T00:00:0020120920", "orderId": "004980000100", "clientIdcustomerId": "000057000051", "clientcustomer": "JOSE MOREIRA COM DE PLASTICOSC & N DISTRIBUIDORA LTDA", "sellerId": "000003000002", "seller": "SONIA VIRGINIA SALES FEITOSAMARCELINA DOS SANTOS BEZERRA", "state": "PI", "total": 2460.1324, "status": "3Faturado" }, { "date": "2014-08-15T00:00:0020120920", "orderId": "004981000101", "clientIdcustomerId": "000227000167", "clientcustomer": "DEUSUITE PEREIRA VERASMANOEL EMIDIO DE OLIVEIRA ME", "sellerId": "000003000002", "seller": "SONIA VIRGINIA SALES FEITOSAMARCELINA DOS SANTOS BEZERRA", "state": "PI", "total": 1129.2150, "status": "3Faturado" }, { "date": "2014-08-18T00:00:0020120920", "orderId": "004982000102", "clientIdcustomerId": "000026000107", "clientcustomer": "C V NEIVA DE OLIVEIRAFRIGOTIL FRIGORIFICO DE TIMON SA", "sellerId": "000001000002", "seller": "CARLOS VINICIUS NEIVA DE OLIVEIRAMARCELINA DOS SANTOS BEZERRA", "state": "MA", "total": 517.6405, "status": "3Faturado" } ] } |