...
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "success": true, "error": null, "integrationHubServiceId": "ea2aecdb66ca34be-7a37a568-449f4444-99e1a78d-aa1346b09524098a68686e58", "orderKeyType": "CARD", "orderKey":[ "06", "10", "19" [], "consumption": [ { { "orderId": "7cf20761ad976378-adc78823-4a7948d3-98c39cd1-2259dd2b285662d68cf3be77", "type": "CARD", "createdAt": "2024-0209-0809 1012:1233:0552", "customerName": "TOTVS", "items": [ { "id":"251", "index":"331811", "name":"TESTE MYTAPP", "externalCode":"251", "unit":"UNIT", "ean":"", "quantity":1, "specialInstructions":"", "unitPrice":{ "value":99.9, "currency":"R$" }, "optionsPrice":{ "value":0, "currency":"R$" }, "totalPrice":{ "value":99.9, "currency":"R$" }, "options":null, "productionPoint":[ { "name":"NENHUM" } ] } ], "otherFees":[ { "name":"Taxa de Serviço", "type":"SERVICE_FEE", "receivedBy":"MERCHANT", "receiverDocument":"", "price":{ "value":9.99, "currency":"R$" }, "observation":"" } ], "discounts":null, "total":{ "items":99.9, "otherFees":9.99, "discount":0, "orderAmount":109.89 }, "delivery":null, "takeout":null, "indoor":null, "table":null, "card":{ "waiterCode": 123, "cardNumber": 4242424242424242, "deliveryTableNumber": 0 }, { "orderId":"244e2bc1-b7ef-4260-bbf5-49251bdc5f0f", "type":"TABLE", "createdAt":"2024-02-08 10:45:02", "customerName":"TOTVS", "items":[ { "id":"1", "index":"331820", "name":"A FRANCESA", "externalCode":"1", "unit":"UNIT", "ean":"", "quantity":1, "specialInstructions":"", "unitPrice":{ "value":69.9, "currency":"R$" }, "optionsPrice":{ "value":0, "currency":"R$" }, "totalPrice":{ "value":69.9, "currency":"R$" }, "options":null, "productionPoint":[ { "name":"COZINHA" } ] }, { "id":"4", "index":"331821", "name":"AVELA", "externalCode":"4", "unit":"UNIT", "ean":"", "quantity":1, "specialInstructions":"", "unitPrice":{ "value":37.99, "currency":"R$" }, "optionsPrice":{ "value":0, "currency":"R$" }, "totalPrice":{ "value":37.99, "currency":"R$" }, "options":null, "productionPoint":[ { "name":"COZINHA" } ] } ], "otherFees":[ { "name":"Taxa de Serviço", "type":"SERVICE_FEE", "receivedBy":"MERCHANT", "receiverDocument":"", "price":{ "value":10.78, "currency":"R$" }, "observation":"" } ], "discounts":null, "total":{ "items":107.89, "otherFees":10.78, "discount":0, "orderAmount":118.67 }, "delivery":null, "takeout":null, "indoor":null, "table":{ "waiterCode":1, "tableNumber":10, "chairNumber":0 }, "card":null }, { "orderId":"b6017f3d-e680-4840-b69f-d2b573d4f8c0", "type":"TABLE", "createdAt":"2024-02-25 14:01:50", "customerName":"TOTVS", "items":[ { "id":"5", "index":"331838", "name":"BRIGADEIRO COM BABA DE MOCA", "externalCode":"5", "unit":"UNIT", "ean":"", "quantity":2, "specialInstructions":"", "unitPrice":{ "value":29.99, "currency":"R$" }, "optionsPrice":{ "value":0, "currency":"R$" }, "totalPrice":{ "value":30.2, "currency":"R$" }, "options":null, "productionPoint":[ { "name":"COZINHA" } ] }, { "id":"6", "index":"331839", "name":"BRIGADEIRO 2", "externalCode":"6", "unit":"UNIT", "ean":"", "quantity":2, "specialInstructions":"", "unitPrice":{ "value":63, "currency":"R$" }, "optionsPrice":{ "value":0, "currency":"R$" }, "totalPrice":{ "value":63.42, "currency":"R$" }, "options":null, "productionPoint":[ { "name":"COZINHA" } ] }, { "id":"5", "index":"331841", "name":"BRIGADEIRO COM BABA DE MOCA", "externalCode":"5", "unit":"UNIT", "ean":"", "quantity":1, "specialInstructions":"", "unitPrice":{ "value":29.99, "currency":"R$" }, "optionsPrice":{ "value":0, "currency":"R$" }, "totalPrice":{ "value":15.11, "currency":"R$" }, "options":null, "productionPoint":[ { "name":"COZINHA" } ] }, { "id":"6", "index":"331842", "name":"BRIGADEIRO 2", "externalCode":"6", "unit":"UNIT", "ean":"", "quantity":1, "specialInstructions":"", "unitPrice":{ "value":63, "currency":"R$" }, "optionsPrice":{ "value":0, "currency":"R$" }, "totalPrice":{ "value":31.7, "currency":"R$" }, "options":null, "productionPoint":[ { "name":"COZINHA" } ] } ], "otherFees":[ { "name":"Taxa de Serviço", "type":"SERVICE_FEE", "receivedBy":"MERCHANT", "receiverDocument":"", "price":{ "value":14.04, "currency":"R$" }, "observation":"" } ], "discounts":null, "total":{ "items":140.43, "otherFees":14.04, "discount":0, "orderAmount":154.47 }, "delivery":null, "takeout":null, "indoor":null, "table":{ "waiterCode":9999, "tableNumber":19, "chairNumber":0 }, "card":null } ] } |
...
{
"id": "181",
"index": "181",
"name": "A FRANCESA",
"externalCode": "1",
"unit": "UNIT",
"ean": "",
"quantity": 1,
"specialInstructions": "TESTE",
"unitPrice": {
"value": 69.9,
"currency": "R$"
},
"optionsPrice": {
"value": 0,
"currency": "R$"
},
"totalPrice": {
"value": 69.9,
"currency": "R$"
},
"options": null,
"productionPoint": [
{
"name": "COZINHA"
}
]
},
{
"id": "1",
"index": "1",
"name": "MARACUJA",
"externalCode": "58",
"unit": "UNIT",
"ean": "",
"quantity": 1,
"specialInstructions": "TESTE",
"unitPrice": {
"value": 61,
"currency": "R$"
},
"optionsPrice": {
"value": 0,
"currency": "R$"
},
"totalPrice": {
"value": 61,
"currency": "R$"
},
"options": null,
"productionPoint": [
{
"name": "NENHUM"
}
]
}
],
"otherFees": [
{
"name": "Taxa de Serviço",
"type": "SERVICE_FEE",
"receivedBy": "MERCHANT",
"receiverDocument": "",
"price": {
"value": 13.09,
"currency": "R$"
},
"observation": ""
}
],
"discounts": null,
"total": {
"items": 130.9,
"otherFees": 13.09,
"discount": 0,
"orderAmount": 143.99
},
"delivery": null,
"takeout": null,
"indoor": null,
"table": null,
"card": {
"waiterCode": 9999,
"cardNumber": 1,
"deliveryTableNumber": 326
}
},
{
"orderId": "2160c838-97d0-432f-a43a-dce087150d49",
"type": "CARD",
"createdAt": "2024-09-09 14:57:36",
"customerName": "TOTVS",
"items": [
{
"id": "200",
"index": "20",
"name": "A FRANCESA",
"externalCode": "1",
"unit": "UNIT",
"ean": "",
"quantity": 1,
"specialInstructions": "TESTE",
"unitPrice": {
"value": 69.9,
"currency": "R$"
},
"optionsPrice": {
"value": 0,
"currency": "R$"
},
"totalPrice": {
"value": 69.9,
"currency": "R$"
},
"options": null,
"productionPoint": [
{
"name": "COZINHA"
}
]
}
],
"otherFees": [
{
"name": "Taxa de Serviço",
"type": "SERVICE_FEE",
"receivedBy": "MERCHANT",
"receiverDocument": "",
"price": {
"value": 6.99,
"currency": "R$"
},
"observation": ""
}
],
"discounts": null,
"total": {
"items": 69.9,
"otherFees": 6.99,
"discount": 0,
"orderAmount": 76.89
},
"delivery": null,
"takeout": null,
"indoor": null,
"table": null,
"card": {
"waiterCode": 9999,
"cardNumber": 340,
"deliveryTableNumber": 340
}
},
{
"orderId": "5b8d7e5c-f87e-40ac-91b7-726da529fc88",
"type": "CARD",
"createdAt": "2024-09-09 14:39:39",
"customerName": "TOTVS",
"items": [
{
"id": "1",
"index": "332003",
"name": "A FRANCESA",
"externalCode": "1",
"unit": "UNIT",
"ean": "",
"quantity": 1,
"specialInstructions": "",
"unitPrice": {
"value": 69.9,
"currency": "R$"
},
"optionsPrice": {
"value": 0,
"currency": "R$"
},
"totalPrice": {
"value": 69.9,
"currency": "R$"
},
"options": null,
"productionPoint": [
{
"name": "COZINHA"
}
]
}
],
"otherFees": [
{
"name": "Taxa de Serviço",
"type": "SERVICE_FEE",
"receivedBy": "MERCHANT",
"receiverDocument": "",
"price": {
"value": 6.99,
"currency": "R$"
},
"observation": ""
}
],
"discounts": null,
"total": {
"items": 69.9,
"otherFees": 6.99,
"discount": 0,
"orderAmount": 76.89
},
"delivery": null,
"takeout": null,
"indoor": null,
"table": null,
"card": {
"waiterCode": 9999,
"cardNumber": 4040,
"deliveryTableNumber": 0
}
}
]
} |
...
02. Obter detalhes de um consumo específico:
Âncora | ||||
---|---|---|---|---|
|
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"integrationHubServiceId": "66ca34be-a568-4444-a78d-098a68686e58",
"orderKeyType": "TABLE",
"orderKey": ["40"]
} |
Nota | ||
---|---|---|
| ||
A solicitação foi aceita, mas ainda não foi processada. É necessário aguardar alguns momentos e, em seguida, entrar em contato no mesmo endereço para obter o status do consumo solicitado. |
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"errors": [
{
"key": "orderKeyType_orderKey",
"message": "Order consumption request already exists: TABLE_40"
}
]
}
|
Nota | ||
---|---|---|
| ||
A solicitação já foi enviada. É necessário aguardar alguns momentos e, em seguida, entrar em contato no mesmo endereço para obter o status do consumo solicitado. |
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"success": true,
"error": null,
"integrationHubServiceId": "66ca34be-a568-4444-a78d-098a68686e58",
"orderKeyType": "CARD",
"orderKey": [
"340"
],
"consumption": [
{
"orderId": "2160c838-97d0-432f-a43a-dce087150d49",
"type": "CARD",
"createdAt": "2024-09-09 14:57:36",
"customerName": "TOTVS",
"items": [
{
"id": "200",
"index": "20",
"name": "A FRANCESA",
"externalCode": "1",
"unit": "UNIT",
"ean": "",
"quantity": 1,
"specialInstructions": "TESTE",
"unitPrice": {
"value": 69.9,
"currency": "R$"
},
"optionsPrice": {
"value": 0,
"currency": "R$"
},
"totalPrice": {
"value": 69.9,
"currency": "R$"
},
"options": null,
"productionPoint": [
{
"name": "COZINHA"
}
]
}
],
"otherFees": [
{
"name": "Taxa de Serviço",
"type": "SERVICE_FEE",
"receivedBy": "MERCHANT",
"receiverDocument": "",
"price": {
"value": 6.99,
"currency": "R$"
},
"observation": ""
}
],
"discounts": null,
"total": {
"items": 69.9,
"otherFees": 6.99,
"discount": 0,
"orderAmount": 76.89
},
"delivery": null,
"takeout": null,
"indoor": null,
"table": null,
"card": {
"waiterCode": 9999,
"cardNumber": 340,
"deliveryTableNumber": 340
}
}
]
} |
Nota | ||
---|---|---|
| ||
A solicitação foi processada com sucesso e o resultado foi retornado conforme esperado. |
...
04. Retornar o status de múltiplos pedidos:
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"integrationHubServiceId": "66ca34be-a568-4444-a78d-098a68686e58",
"orderKeyType": "TABLE",
"orderKey": ["340", "350"]
} |
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"success": true,
"error": null,
"integrationHubServiceId": "66ca34be-a568-4444-a78d-098a68686e58",
"orderKeyType": "CARD",
"orderKey": [
"340",
"350"
],
"consumption": [
{
"orderId": "2160c838-97d0-432f-a43a-dce087150d49",
"type": "CARD",
"createdAt": "2024-09-09 14:57:36",
"customerName": "TOTVS",
"items": [
{
"id": "200",
"index": "20",
"name": "A FRANCESA",
"externalCode": "1",
"unit": "UNIT",
"ean": "",
"quantity": 1,
"specialInstructions": "TESTE",
"unitPrice": {
"value": 69.9,
"currency": "R$"
},
"optionsPrice": {
"value": 0,
"currency": "R$"
},
"totalPrice": {
"value": 69.9,
"currency": "R$"
},
"options": null,
"productionPoint": [
{
"name": "COZINHA"
}
]
}
],
"otherFees": [
{
"name": "Taxa de Serviço",
"type": "SERVICE_FEE",
"receivedBy": "MERCHANT",
"receiverDocument": "",
"price": {
"value": 6.99,
"currency": "R$"
},
"observation": ""
}
],
"discounts": null,
"total": {
"items": 69.9,
"otherFees": 6.99,
"discount": 0,
"orderAmount": 76.89
},
"delivery": null,
"takeout": null,
"indoor": null,
"table": null,
"card": {
"waiterCode": 9999,
"cardNumber": 340,
"deliveryTableNumber": 340
}
},
{
"orderId": "1fbcd589-1bbd-472c-a28d-6b1164282964",
"type": "CARD",
"createdAt": "2024-09-09 15:27:18",
"customerName": "TOTVS",
"items": [
{
"id": "201",
"index": "201",
"name": "A FRANCESA",
"externalCode": "1",
"unit": "UNIT",
"ean": "",
"quantity": 1,
"specialInstructions": "TESTE",
"unitPrice": {
"value": 69.9,
"currency": "R$"
},
"optionsPrice": {
"value": 0,
"currency": "R$"
},
"totalPrice": {
"value": 69.9,
"currency": "R$"
},
"options": null,
"productionPoint": [
{
"name": "COZINHA"
}
]
}
],
"otherFees": [
{
"name": "Taxa de Serviço",
"type": "SERVICE_FEE",
"receivedBy": "MERCHANT",
"receiverDocument": "",
"price": {
"value": 6.99,
"currency": "R$"
},
"observation": ""
}
],
"discounts": null,
"total": {
"items": 69.9,
"otherFees": 6.99,
"discount": 0,
"orderAmount": 76.89
},
"delivery": null,
"takeout": null,
"indoor": null,
"table": null,
"card": {
"waiterCode": 9999,
"cardNumber": 350,
"deliveryTableNumber": 340
}
}
]
} |
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"integrationHubServiceId": "7056c970-cb11-400f-9d4f-9f30253f3b0b",
"orderKeyType": "TABLE",
"orderKey": ["40"]
} |
Nota | ||
---|---|---|
| ||
A solicitação foi aceita, mas ainda não foi processada. É necessário aguardar alguns momentos e, em seguida, entrar em contato no mesmo endereço para obter o status do consumo solicitado. |
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"errors": [
{
"key": "orderKeyType_orderKey",
"message": "Order consumption request already exists: TABLE_40"
}
]
}
|
Nota | ||
---|---|---|
| ||
A solicitação já foi enviada. É necessário aguardar alguns momentos e, em seguida, entrar em contato no mesmo endereço para obter o status do consumo solicitado. |
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"success": true,
"error": null,
"integrationHubServiceId": "7056c970-cb11-400f-9d4f-9f30253f3b0b",
"orderKeyType": "TABLE",
"orderKey": [
"40"
],
"consumption": [
{
"orderId": "d8ef12c3-ce5f-4bfa-b1d2-ebde107a2f02",
"type": "TABLE",
"createdAt": "2024-06-28 17:27:20",
"customerName": "TOTVS",
"items": [
{
"id": "39735945",
"index": "4",
"name": "MARACUJA",
"externalCode": "58",
"unit": "UNIT",
"ean": "",
"quantity": 1,
"specialInstructions": "TESTE",
"unitPrice": {
"value": 61,
"currency": "R$"
},
"optionsPrice": {
"value": 0,
"currency": "R$"
},
"totalPrice": {
"value": 61,
"currency": "R$"
},
"options": null,
"productionPoint": [
{
"name": "NENHUM"
}
]
}
],
"otherFees": [
{
"name": "Taxa de Serviço",
"type": "SERVICE_FEE",
"receivedBy": "MERCHANT",
"receiverDocument": "",
"price": {
"value": 6.1,
"currency": "R$"
},
"observation": ""
}
],
"discounts": [],
"total": {
"items": 61,
"otherFees": 6.1,
"discount": 0,
"orderAmount": 67.1
},
"delivery": null,
"takeout": null,
"indoor": null,
"table": {
"waiterCode": 9999,
"tableNumber": 40,
"chairNumber": 0
},
"card": null
}
]
} |
Nota | ||
---|---|---|
| ||
A solicitação foi processada com sucesso e o resultado foi retornado conforme esperado. |
04. Retornar o status de múltiplos pedidos:
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"integrationHubServiceId": "ab70a3ce-915b-42ee-9d7f-049d36e26eca",
"orderKeyType": "TABLE",
"orderKey": ["20", "40"]
} |
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"success": true,
"error": null,
"integrationHubServiceId": "ab70a3ce-915b-42ee-9d7f-049d36e26eca",
"orderKeyType": "TABLE",
"orderKey": [
"20",
"40"
],
"consumption": [
{
"orderId": "2299a4af-2363-4aa8-803b-b95f7d8e8a7b",
"type": "TABLE",
"createdAt": "2024-06-28 17:27:20",
"customerName": "TOTVS",
"items": [
{
"id": "39735945",
"index": "4",
"name": "MARACUJA",
"externalCode": "58",
"unit": "UNIT",
"ean": "",
"quantity": 1,
"specialInstructions": "TESTE",
"unitPrice": {
"value": 61,
"currency": "R$"
},
"optionsPrice": {
"value": 0,
"currency": "R$"
},
"totalPrice": {
"value": 61,
"currency": "R$"
},
"options": null,
"productionPoint": [
{
"name": "NENHUM"
}
]
}
],
"otherFees": [
{
"name": "Taxa de Serviço",
"type": "SERVICE_FEE",
"receivedBy": "MERCHANT",
"receiverDocument": "",
"price": {
"value": 6.1,
"currency": "R$"
},
"observation": ""
}
],
"discounts": [],
"total": {
"items": 61,
"otherFees": 6.1,
"discount": 0,
"orderAmount": 67.1
},
"delivery": null,
"takeout": null,
"indoor": null,
"table": {
"waiterCode": 9999,
"tableNumber": 20,
"chairNumber": 0
},
"card": null
}
]
} |
Informações | ||
---|---|---|
| ||
Neste exemplo, os dados retornados incluem:
|
Informações | ||
---|---|---|
| ||
integrationHubServiceId: é um código da integração da loja com o Integration Hub orderKey: é o código do pedido |
...
A seguir, alguns dos erros comuns que podem ser apresentados ao lidar com requisições HTTP e suas respectivas respostas:
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "integrationHubServiceId": "a9cad63966ca34be-5775a568-4f8a4444-917ba78d-2ae0f2d284d8098a68686e58", "orderKeyType": "string", "orderKey": ["string"] } |
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "integrationHubServiceId": "a5c4e13566ca34be-aacda568-49c14444-b051a78d-160a78a83b56098a68686e58" } |
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "errors": [ { "key": "orderKeyType", "message": "body.orderKeyType is required" }, { "key": "orderKey", "message": "body.orderKey is required" } ] } |
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "integrationHubServiceId": "9a1cf32666ca34be-c962a568-456f4444-8c49a78d-c1bb2f340fc6A098a68686eAA", "orderKeyType": "TABLE", "orderKey": [] } |
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "integrationHubServiceId": "808c143d66ca34be-d6d4a568-4b954444-8c37a78d-efa3a934f222098a68686e58", "orderKeyType": "TABLE", "orderKey": [""] } |
...
O código de status HTTP 403, conhecido como "Forbidden" (Proibido), indica que o servidor entendeu a requisição do cliente, mas está se recusando a cumpri-la. Isso geralmente ocorre quando o cliente não possui permissões adequadas para acessar o recurso solicitado, mesmo que as credenciais de autenticação tenham sido fornecidas corretamenteenviou a URL incorreta para a requisição.
Bloco de código | ||
---|---|---|
| ||
https://api-barramento.meuelevestage.com/order/getConsumptionsgetConsumptionS |
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "message": "Missing Authentication Token" } |
...
Âncora | ||||
---|---|---|---|---|
|
O código de status HTTP 404, conhecido como "Not Found" (Não Encontrado), indica que o servidor não encontrou o recurso solicitado. Isso pode ocorrer quando o URL fornecido integrationHubId
está incorreto , o recurso foi removido permanentemente ou não está disponível no momento da requisiçãoou inválido.
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "integrationHubServiceId": "f1b874af-96ab-4535-aac3-25118fe586cc", "orderKeyType": "TABLE", "orderKey": ["5350"] } |
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "errors": [ { "key": "integrationHubServiceId", "message": "Provider Merchant for integrationHubServiceId \"f1b874af-96ab-4535-aac3-25118fe586cc\" not found or disabled" } ] } |
...
Âncora | ||||
---|---|---|---|---|
|
O código de status HTTP 412, conhecido como "Precondition Failed" (Pré-condição Falhou), indica que o servidor não atendeu a uma das pré-condições que o cliente colocou no cabeçalho da requisição.
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "integrationHubServiceId": "7d7d205b66ca34be-83baa568-47c54444-91baa78d-e4f32a2bbd9e098a68686e58", "orderKeyType": "TABLE", "orderKey": ["20340", "40350"] } |
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "success": true, "error": null, "integrationHubServiceId": "7d7d205b-83ba-47c5-91ba-e4f32a2bbd9e", "orderKeyType": "TABLE", "orderKey": [ "20", "40" ], "consumption": [ { "orderId": "f5fee4b4-c13f-482d-8e98-0dd840629e02", "type": "TABLE", "createdAt": "2024-06-28 17:27:20", "customerName": "TOTVS", "items": [ { "id": "39735945", "index": "4", "name": "MARACUJA", "externalCode": "58", "unit": "UNIT", "ean": "", "quantity": 1, "specialInstructions": "TESTE", "unitPrice": { "value": 61, "currency": "R$" }, "optionsPrice": { "value": 0, "currency": "R$" }, "totalPrice": { "value": 61, "currency": "R$" }, "options": null, "productionPoint": [ { "name": "NENHUM" } ] } ], "otherFees": [ { "name": "Taxa de Serviço", "type": "SERVICE_FEE", "receivedBy": "MERCHANT", "receiverDocument": "", "price": { "value": 6.1, "currency": "R$" }, "observation": "" } ], "discounts": [], "total": { "items": 61, "otherFees": 6.1, "discount": 0, "orderAmount": 67.1 }, "delivery": null, "takeout": null, "indoor": null, "table": { "waiterCode": 9999, "tableNumber": 20, "chairNumber": 0 }, "card": null } ] } |
...