...
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 |
Formato para obtenção de informações específicas de pedidos de venda
localhost/Order/CodigoPedido/ |
---|
Exemplos:
Caso seja necessário retornar um pedido específico
{ "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
Exemplo 1: Retornando os pedidos de vendas realizadas pelos vendedores de códigos 000001, 000004 e 000026
localhost/Order?sellers=000001,000004,000026 |
---|
{ "total": 1152, "hasNext": false, "syncing": false, "lines": [ { "date": "20120908", "orderId": "000005", "customerId": "000133", "customer": "M H DE SOUZA FRANCO", "sellerId": "000004", "seller": "MARCIO PEREIRA PASSOS REPRESENTACOES LTDA", "state": "MA", "total": 5725, "status": "Orçamento de Venda" }, { "date": "20120912", "orderId": "000035", "customerId": "000073", "customer": "MARCELO ASSUNCAO SILVA", "sellerId": "000004", "seller": "MARCIO PEREIRA PASSOS REPRESENTACOES LTDA", "state": "MA", "total": 150.5, "status": "Faturado" }, { "date": "20120912", "orderId": "000040", "customerId": "000073", "customer": "MARCELO ASSUNCAO SILVA", "sellerId": "000004", "seller": "MARCIO PEREIRA PASSOS REPRESENTACOES LTDA", "state": "MA", "total": 602, "status": "Faturado" } ] } |
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": "20121023", "orderId": "000319", "customerId": "000149", "customer": "NOLECON COM DE MAT DE LIMPEZA", "sellerId": "000004", "seller": "MARCIO PEREIRA PASSOS REPRESENTACOES LTDA", "state": "MA", "total": 1420, "status": "Faturado" }, { "date": "20121207", "orderId": "000603", "customerId": "000149", "customer": "NOLECON COM DE MAT DE LIMPEZA", "sellerId": "000004", "seller": "MARCIO PEREIRA PASSOS REPRESENTACOES LTDA", "state": "MA", "total": 1775, "status": "Faturado" }, { "date": "20130112", "orderId": "000779", "customerId": "000149", "customer": "NOLECON COM DE MAT DE LIMPEZA", "sellerId": "000004", "seller": "MARCIO PEREIRA PASSOS REPRESENTACOES LTDA", "state": "MA", "total": 897.5, "status": "Faturado" } ] } |
Exemplo 3: Retornando pedidos de venda em ordem decrescente de número
localhost/Order?order=orderid desc |
---|
{ "total": 5394, "hasNext": false, "syncing": false, "lines": [ { "date": "20150313", "orderId": "2373", "customerId": "000026", "customer": "C V NEIVA DE OLIVEIRA", "sellerId": "000001", "seller": "CARLOS VINICIUS NEIVA DE OLIVEIRA", "state": "PI", "total": 19.78, "status": "Cancelado" }, { "date": "20150313", "orderId": "2372", "customerId": "000001", "customer": "CARLOS VINICIUS NEIVA DE OLIVEIRA", "sellerId": "000001", "seller": "CARLOS VINICIUS NEIVA DE OLIVEIRA", "state": "PI", "total": 18.44, "status": "Cancelado" }, { "date": "20150313", "orderId": "2371", "customerId": "000001", "customer": "CARLOS VINICIUS NEIVA DE OLIVEIRA", "sellerId": "000001", "seller": "CARLOS VINICIUS NEIVA DE OLIVEIRA", "state": "PI", "total": 18.44, "status": "Cancelado" } ] } |
Exemplo 4: Retornando a página 20 com 3 registros por página
localhost/Order?max=3&page=20 |
---|
{ "total": 5394, "hasNext": true, "syncing": false, "lines": [ { "date": "20120920", "orderId": "000100", "customerId": "000051", "customer": "C & N DISTRIBUIDORA LTDA", "sellerId": "000002", "seller": "MARCELINA DOS SANTOS BEZERRA", "state": "PI", "total": 324, "status": "Faturado" }, { "date": "20120920", "orderId": "000101", "customerId": "000167", "customer": "MANOEL EMIDIO DE OLIVEIRA ME", "sellerId": "000002", "seller": "MARCELINA DOS SANTOS BEZERRA", "state": "PI", "total": 150, "status": "Faturado" }, { "date": "20120920", "orderId": "000102", "customerId": "000107", "customer": "FRIGOTIL FRIGORIFICO DE TIMON SA", "sellerId": "000002", "seller": "MARCELINA DOS SANTOS BEZERRA", "state": "MA", "total": 405, "status": "Faturado" } ] } |