curl --request GET \
--url https://api.deliveryvip.com.br/merchant/v3/{merchantId}/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.deliveryvip.com.br/merchant/v3/{merchantId}/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.deliveryvip.com.br/merchant/v3/{merchantId}/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.deliveryvip.com.br/merchant/v3/{merchantId}/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.deliveryvip.com.br/merchant/v3/{merchantId}/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.deliveryvip.com.br/merchant/v3/{merchantId}/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryvip.com.br/merchant/v3/{merchantId}/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "DELIVERY",
"displayId": "<string>",
"salesChannel": "STORE",
"createdAt": "2023-11-07T05:31:56Z",
"orderTiming": "INSTANT",
"preparationStartDateTime": "2023-11-07T05:31:56Z",
"lastEvent": "CREATED",
"merchant": {
"id": "<string>",
"name": "<string>"
},
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"index": 123,
"name": "<string>",
"externalCode": "<string>",
"unit": "UN",
"ean": "<string>",
"quantity": 123,
"specialInstructions": "<string>",
"unitPrice": {
"value": 39.9,
"currency": "BRL"
},
"optionsPrice": {
"value": 39.9,
"currency": "BRL"
},
"totalPrice": {
"value": 39.9,
"currency": "BRL"
},
"options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"index": 123,
"name": "<string>",
"externalCode": "<string>",
"unit": "UN",
"quantity": 123,
"unitPrice": {
"value": 39.9,
"currency": "BRL"
},
"totalPrice": {
"value": 39.9,
"currency": "BRL"
}
}
],
"optionGroups": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"externalCode": "<string>",
"totalPrice": {
"value": 39.9,
"currency": "BRL"
},
"options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"index": 123,
"name": "<string>",
"externalCode": "<string>",
"unit": "UN",
"quantity": 123,
"unitPrice": {
"value": 39.9,
"currency": "BRL"
},
"totalPrice": {
"value": 39.9,
"currency": "BRL"
}
}
]
}
],
"optionsGroup": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"externalCode": "<string>",
"totalPrice": {
"value": 39.9,
"currency": "BRL"
},
"options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"index": 123,
"name": "<string>",
"externalCode": "<string>",
"unit": "UN",
"quantity": 123,
"unitPrice": {
"value": 39.9,
"currency": "BRL"
},
"totalPrice": {
"value": 39.9,
"currency": "BRL"
}
}
]
}
]
}
],
"otherFees": [
{
"name": "<string>",
"type": "DELIVERY_FEE",
"receivedBy": "MARKETPLACE",
"receiverDocument": "<string>",
"price": {
"value": 39.9,
"currency": "BRL"
}
}
],
"discounts": [
{
"amount": {
"value": 39.9,
"currency": "BRL"
},
"target": "CART",
"sponsorshipValues": [
{
"name": "MARKETPLACE",
"amount": {
"value": 39.9,
"currency": "BRL"
},
"discountCode": "<string>"
}
]
}
],
"total": {
"itemsPrice": {
"value": 39.9,
"currency": "BRL"
},
"otherFees": {
"value": 39.9,
"currency": "BRL"
},
"discount": {
"value": 39.9,
"currency": "BRL"
},
"orderAmount": {
"value": 39.9,
"currency": "BRL"
}
},
"payments": {
"prepaid": 123,
"pending": 123,
"methods": [
{
"value": 123,
"currency": "BRL",
"type": "PREPAID",
"method": "CREDIT",
"brand": "VISA",
"methodInfo": "<string>",
"changeFor": 123
}
]
},
"loyalty": {
"accountId": "<string>",
"programId": "<string>",
"redemption": {
"externalId": "<string>",
"status": "CONFIRMED",
"amount": {
"value": 39.9,
"currency": "BRL"
}
}
},
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"documentNumber": "<string>",
"phone": {
"number": "5511999999999"
},
"email": "<string>",
"ordersCountOnMerchant": 123
},
"schedule": {
"scheduledDateTimeStart": "2023-11-07T05:31:56Z",
"scheduledDateTimeEnd": "2023-11-07T05:31:56Z"
},
"delivery": {
"deliveredBy": "MERCHANT",
"estimatedDeliveryDateTime": "2023-11-07T05:31:56Z",
"deliveryAddress": {
"country": "BR",
"state": "SP",
"city": "São Paulo",
"district": "Moema",
"street": "Avenida Ibirapuera",
"number": "100",
"complement": "Bloco 2, apto 31",
"reference": "Casa amarela",
"postalCode": "04029-000",
"formattedAddress": "<string>",
"coordinates": {
"latitude": -23.54809,
"longitude": -46.63638
}
}
},
"takeout": {
"mode": "DEFAULT",
"takeoutDateTime": "2023-11-07T05:31:56Z"
},
"indoor": {
"mode": "DEFAULT",
"indoorDateTime": "2023-11-07T05:31:56Z",
"place": "<string>",
"placeName": "<string>",
"placeId": "<string>",
"tab": "<string>",
"tabId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tabName": "<string>",
"tabCode": "<string>"
},
"sendDelivered": true,
"sendPreparing": true,
"sendPickedUp": true,
"sendTracking": true,
"extraInfo": "<string>"
}
]{
"status": "404",
"title": "Record not found"
}{
"title": "Unauthorized",
"status": 401
}{
"status": "404",
"title": "Record not found"
}{
"status": "404",
"title": "Record not found"
}Listar pedidos
Lista os pedidos da loja, do mais recente para o mais antigo, com paginação por cursor. Quando há mais páginas, a resposta traz os cabeçalhos X-Next-Cursor/X-Previous-Cursor e Link (rel="next" e rel="prev").
curl --request GET \
--url https://api.deliveryvip.com.br/merchant/v3/{merchantId}/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.deliveryvip.com.br/merchant/v3/{merchantId}/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.deliveryvip.com.br/merchant/v3/{merchantId}/orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.deliveryvip.com.br/merchant/v3/{merchantId}/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.deliveryvip.com.br/merchant/v3/{merchantId}/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.deliveryvip.com.br/merchant/v3/{merchantId}/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryvip.com.br/merchant/v3/{merchantId}/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "DELIVERY",
"displayId": "<string>",
"salesChannel": "STORE",
"createdAt": "2023-11-07T05:31:56Z",
"orderTiming": "INSTANT",
"preparationStartDateTime": "2023-11-07T05:31:56Z",
"lastEvent": "CREATED",
"merchant": {
"id": "<string>",
"name": "<string>"
},
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"index": 123,
"name": "<string>",
"externalCode": "<string>",
"unit": "UN",
"ean": "<string>",
"quantity": 123,
"specialInstructions": "<string>",
"unitPrice": {
"value": 39.9,
"currency": "BRL"
},
"optionsPrice": {
"value": 39.9,
"currency": "BRL"
},
"totalPrice": {
"value": 39.9,
"currency": "BRL"
},
"options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"index": 123,
"name": "<string>",
"externalCode": "<string>",
"unit": "UN",
"quantity": 123,
"unitPrice": {
"value": 39.9,
"currency": "BRL"
},
"totalPrice": {
"value": 39.9,
"currency": "BRL"
}
}
],
"optionGroups": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"externalCode": "<string>",
"totalPrice": {
"value": 39.9,
"currency": "BRL"
},
"options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"index": 123,
"name": "<string>",
"externalCode": "<string>",
"unit": "UN",
"quantity": 123,
"unitPrice": {
"value": 39.9,
"currency": "BRL"
},
"totalPrice": {
"value": 39.9,
"currency": "BRL"
}
}
]
}
],
"optionsGroup": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"externalCode": "<string>",
"totalPrice": {
"value": 39.9,
"currency": "BRL"
},
"options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"index": 123,
"name": "<string>",
"externalCode": "<string>",
"unit": "UN",
"quantity": 123,
"unitPrice": {
"value": 39.9,
"currency": "BRL"
},
"totalPrice": {
"value": 39.9,
"currency": "BRL"
}
}
]
}
]
}
],
"otherFees": [
{
"name": "<string>",
"type": "DELIVERY_FEE",
"receivedBy": "MARKETPLACE",
"receiverDocument": "<string>",
"price": {
"value": 39.9,
"currency": "BRL"
}
}
],
"discounts": [
{
"amount": {
"value": 39.9,
"currency": "BRL"
},
"target": "CART",
"sponsorshipValues": [
{
"name": "MARKETPLACE",
"amount": {
"value": 39.9,
"currency": "BRL"
},
"discountCode": "<string>"
}
]
}
],
"total": {
"itemsPrice": {
"value": 39.9,
"currency": "BRL"
},
"otherFees": {
"value": 39.9,
"currency": "BRL"
},
"discount": {
"value": 39.9,
"currency": "BRL"
},
"orderAmount": {
"value": 39.9,
"currency": "BRL"
}
},
"payments": {
"prepaid": 123,
"pending": 123,
"methods": [
{
"value": 123,
"currency": "BRL",
"type": "PREPAID",
"method": "CREDIT",
"brand": "VISA",
"methodInfo": "<string>",
"changeFor": 123
}
]
},
"loyalty": {
"accountId": "<string>",
"programId": "<string>",
"redemption": {
"externalId": "<string>",
"status": "CONFIRMED",
"amount": {
"value": 39.9,
"currency": "BRL"
}
}
},
"customer": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"documentNumber": "<string>",
"phone": {
"number": "5511999999999"
},
"email": "<string>",
"ordersCountOnMerchant": 123
},
"schedule": {
"scheduledDateTimeStart": "2023-11-07T05:31:56Z",
"scheduledDateTimeEnd": "2023-11-07T05:31:56Z"
},
"delivery": {
"deliveredBy": "MERCHANT",
"estimatedDeliveryDateTime": "2023-11-07T05:31:56Z",
"deliveryAddress": {
"country": "BR",
"state": "SP",
"city": "São Paulo",
"district": "Moema",
"street": "Avenida Ibirapuera",
"number": "100",
"complement": "Bloco 2, apto 31",
"reference": "Casa amarela",
"postalCode": "04029-000",
"formattedAddress": "<string>",
"coordinates": {
"latitude": -23.54809,
"longitude": -46.63638
}
}
},
"takeout": {
"mode": "DEFAULT",
"takeoutDateTime": "2023-11-07T05:31:56Z"
},
"indoor": {
"mode": "DEFAULT",
"indoorDateTime": "2023-11-07T05:31:56Z",
"place": "<string>",
"placeName": "<string>",
"placeId": "<string>",
"tab": "<string>",
"tabId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tabName": "<string>",
"tabCode": "<string>"
},
"sendDelivered": true,
"sendPreparing": true,
"sendPickedUp": true,
"sendTracking": true,
"extraInfo": "<string>"
}
]{
"status": "404",
"title": "Record not found"
}{
"title": "Unauthorized",
"status": 401
}{
"status": "404",
"title": "Record not found"
}{
"status": "404",
"title": "Record not found"
}Autorizações
Token de acesso opaco emitido pela API de autenticação (POST /authentication/v1/oauth/token).
Parâmetros de caminho
Id (UUID) da loja na plataforma. A loja precisa estar autorizada para o aplicativo.
Parâmetros de consulta
Filtra pelo tipo do pedido.
DELIVERY, TAKEOUT, INDOOR, DINE_IN Data inicial (inclusive). Se informada sem ends_in, vai até o fim do dia atual.
Data final (inclusive). Exige starts_at.
Formato dos complementos dos itens. Por padrão, os complementos vêm achatados em items[].options. Com optionGroups, vêm agrupados em items[].optionGroups. groupOptions é o nome antigo do agrupamento (gera items[].optionsGroup) e está descontinuado.
optionGroups, groupOptions Itens por página. Padrão 30; valores informados são limitados entre 30 e 250.
30 <= x <= 250Cursor da próxima página (valor de X-Next-Cursor). Não pode ser combinado com previous.
Cursor da página anterior (valor de X-Previous-Cursor). Não pode ser combinado com next.
Resposta
Página de pedidos.
Id do pedido.
Tipo do pedido. Pedidos de consumo no local são retornados como INDOOR.
DELIVERY, TAKEOUT, INDOOR Código curto do pedido, exibido para a loja e o cliente.
Canal de venda do pedido.
STORE, MARKETPLACE, TABLET, QRCODE, TAB Data e hora de criação do pedido.
Pedido imediato ou agendado.
INSTANT, SCHEDULED Início previsto do preparo (atualmente igual a createdAt).
Último evento do pedido, derivado do seu estado atual. Omitido quando o estado não corresponde a nenhum destes valores.
CREATED, CONFIRMED, READY_FOR_PICKUP, CONCLUDED, CANCELLED Show child attributes
Show child attributes
Show child attributes
Show child attributes
Taxas do pedido. Presente apenas em pedidos de entrega.
Show child attributes
Show child attributes
Descontos aplicados. Omitido quando o pedido não tem desconto.
Show child attributes
Show child attributes
Totais do pedido.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Presente no pedido apenas para aplicativos cujo programa de fidelidade o cliente aderiu. Cada aplicativo recebe somente o bloco do seu próprio programa.
O bloco identifica o cliente no operador e informa o que foi resgatado neste pedido. Ele não traz nenhum valor calculado pela plataforma: as regras de acúmulo pertencem ao operador, que escolhe sua própria base a partir do total do pedido (por exemplo, itemsPrice menos discount, se frete e taxas não devem acumular).
O bloco descreve o pedido como ele está no momento da leitura, não um instante do seu histórico. Um aplicativo que recebe um evento CONCLUDED consulta o pedido e faz o acúmulo; um que recebe um evento CANCELLED estorna o acúmulo que havia concedido para aquele pedido.
Quando um resgate está REVERSED, o saldo voltou para o cliente, que portanto pagou esse valor por outros meios — mas os totais do pedido continuam mostrando o desconto que ele havia financiado. Some redemption.amount.value de volta a qualquer base derivada dos totais do pedido. Um pedido que nunca teve resgate não traz a chave redemption.
Show child attributes
Show child attributes
Cliente. Omitido quando o pedido não tem nome de comprador.
Show child attributes
Show child attributes
Janela do agendamento. Presente apenas em pedidos agendados.
Show child attributes
Show child attributes
Dados da entrega. Presente apenas em pedidos de entrega.
Show child attributes
Show child attributes
Dados da retirada. Presente apenas em pedidos para retirada.
Show child attributes
Show child attributes
Dados do consumo no local. Presente apenas em pedidos INDOOR.
Show child attributes
Show child attributes
A loja é responsável pelo evento DELIVERED (sem operador logístico externo).
A loja deve enviar o evento PREPARING.
A loja é responsável pelo evento PICKED_UP (pedidos para retirada).
A loja deve enviar atualizações de rastreamento.
Observação geral do pedido. Omitida quando vazia.