Home

Série 1

Páginas filhas
  • Order

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

totalQuantidade de registros do retorno
hasNextIndica se há mais registros na próxima página
linesContém as informações dos registros
dateData de emissão do pedido de venda
orderidNúmero do pedido de venda
clientIdID do cliente
clientNome do cliente
selleridID do vendedor
sellerNome do vendedor
stateUF de destino
totalValor total da nota
statusStatus 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

localhost/Order/000005

{
"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"
}

 

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": 1147,
"hasNext": false,
"lines": [
{
"date": "2014-01-21T00:00:00",
"orderId": "003333",
"clientId": "000370",
"client": "HOSPITAL UNIMED TERESINA S S LTDA",
"sellerId": "000026",
"seller": "C V NEIVA DE OLIVEIRA",
"state": "",
"total": 2145,
"status": "3"
},
{
"date": "2014-02-10T00:00:00",
"orderId": "003523",
"clientId": "000378",
"client": "INSTITUTO TECNOLOGICO DE AVALIACAO DO CORACAO SS",
"sellerId": "000026",
"seller": "C V NEIVA DE OLIVEIRA",
"state": "",
"total": 1918.3,
"status": "3"
},
{
"date": "2014-02-20T00:00:00",
"orderId": "003631",
"clientId": "000370",
"client": "HOSPITAL UNIMED TERESINA S S LTDA",
"sellerId": "000026",
"seller": "C V NEIVA DE OLIVEIRA",
"state": "",
"total": 1450,
"status": "3"
}
]


Exemplo 2: Retornando pedidos de venda buscando pelo nome do cliente

localhost/Order?customer=NOLECON COM DE

{

"total": 4,
"hasNext": false,
"lines": [
{
"date": "2012-10-23T00:00:00",
"orderId": "000319",
"clientId": "000149",
"client": "NOLECON COM DE MAT DE LIMPEZA",
"sellerId": "000004",
"seller": "MARCIO PEREIRA PASSOS REPRESENTACOES LTDA",
"state": "",
"total": 1420,
"status": "3"
},
{
"date": "2012-12-07T00:00:00",
"orderId": "000603",
"clientId": "000149",
"client": "NOLECON COM DE MAT DE LIMPEZA",
"sellerId": "000004",
"seller": "MARCIO PEREIRA PASSOS REPRESENTACOES LTDA",
"state": "",
"total": 1775,
"status": "3"
},
{
"date": "2013-01-12T00:00:00",
"orderId": "000779",
"clientId": "000149",
"client": "NOLECON COM DE MAT DE LIMPEZA",
"sellerId": "000004",
"seller": "MARCIO PEREIRA PASSOS REPRESENTACOES LTDA",
"state": "",
"total": 897.5,
"status": "3"
}
]


Exemplo 3: Retornando pedidos de venda em ordem decrescente de número

localhost/Order?order=orderid desc

{

"total": 5389,
"hasNext": false,
"lines": [
{
"date": "2015-01-26T00:00:00",
"orderId": "006092",
"clientId": "000026",
"client": "C V NEIVA DE OLIVEIRA",
"sellerId": "000001",
"seller": "CARLOS VINICIUS NEIVA DE OLIVEIRA",
"state": "",
"total": 210,
"status": "3"
},
{
"date": "2015-01-26T00:00:00",
"orderId": "006091",
"clientId": "000083",
"client": "T R DE S MACEDO",
"sellerId": "000002",
"seller": "MARCELINA DOS SANTOS BEZERRA",
"state": "",
"total": 411,
"status": "3"
},
{
"date": "2015-01-26T00:00:00",
"orderId": "006090",
"clientId": "000058",
"client": "ASSOCIACAO PIAUIENSE DE COMBATE AO CANCER",
"sellerId": "000002",
"seller": "MARCELINA DOS SANTOS BEZERRA",
"state": "",
"total": 4440,
"status": "1"
}
]


Exemplo 4: Retornando a página 20 com 3 registros por página

localhost/Order?max=3&page=20

{

"total": 5389,
"hasNext": true,
"lines": [
{
"date": "2014-08-15T00:00:00",
"orderId": "004980",
"clientId": "000057",
"client": "JOSE MOREIRA COM DE PLASTICOS",
"sellerId": "000003",
"seller": "SONIA VIRGINIA SALES FEITOSA",
"state": "",
"total": 2460.1,
"status": "3"
},
{
"date": "2014-08-15T00:00:00",
"orderId": "004981",
"clientId": "000227",
"client": "DEUSUITE PEREIRA VERAS",
"sellerId": "000003",
"seller": "SONIA VIRGINIA SALES FEITOSA",
"state": "",
"total": 1129.2,
"status": "3"
},
{
"date": "2014-08-18T00:00:00",
"orderId": "004982",
"clientId": "000026",
"client": "C V NEIVA DE OLIVEIRA",
"sellerId": "000001",
"seller": "CARLOS VINICIUS NEIVA DE OLIVEIRA",
"state": "",
"total": 517.6,
"status": "3"
}
]
}