CONTEÚDO
O endpoint Status da API Order Mesa é utilizado para envio do resultado da solicitação de consumo do pedido através do Ponto de Venda (PDV). Este endpoint recebe o mesmo corpo de resposta obtida pelo endpoint GetConsumption
- API Order Mesa - Get Consumption
Método | URL | Ambiente |
---|---|---|
POST | https://api-barramento.meuelevestage.com/order/consumption | Homologação |
POST | https://api-barramento.meueleve.com.br/order/consumption | Produção |
3.1. Request - Corpo da requisição para retornar o consumo específico: Essa requisição é enviada para obter detalhes sobre o consumo de um pedido específico, retornando as informações relevantes do consumo solicitado.
{ "success": true, "error": null, "integrationHubServiceId": "5ffec6b8-1c55-4a7d-985f-12d13685b553", "orderKeyType": "TABLE", "orderKey": [ "204" ], "consumption": [ { "orderId": "f217d261-126c-456a-86d5-d92eda8fbd1a", "type": "TABLE", "createdAt": "2024-09-24 11:07:41", "customerName": "TOTVS", "items": [ { "id": "204", "index": "204", "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": { "waiterCode": 9999, "tableNumber": 204, "chairNumber": 0 }, "card": null } ] } |
A solicitação foi processada com sucesso e o resultado foi retornado conforme esperado. |
02. Request - Corpo da requisição para obter o status de múltiplos pedidos: Essa requisição é utilizada para consultar o status atualizado de vários pedidos simultaneamente, retornando as informações detalhadas de cada pedido solicitado.
{ "success": true, "error": null, "integrationHubServiceId": "644a4d3c-6d2c-4154-a089-c1ab3fd8915", "orderKeyType": "TABLE", "orderKey": [ "06", "19" ], "consumption": [ { "orderId": "c5c1bf93-d112-4f4c-af3b-450b39519e12", "type": "TABLE", "createdAt": "2024-02-08 10:12:05", "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": { "waiterCode": 9999, "tableNumber": 6, "chairNumber": 0 }, "card": null }, { "orderId": "644a4d3c-6d2c-4154-a089-c1ab3fd89151", "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 } ] } |
Consumo enviado com sucesso.. |
Os dados retornados incluem:
|
O corpo da requisição enviada é o mesmo que o corpo da resposta obtida através do endpoint |
Dicionário da Request
Informações sobre os retornos da API cancelledItems.
Enum | Valor |
---|---|
TABLE | TABLE |
CARD | CARD |
ORDERD_ID | ORDER_ID |
Campo | Valor |
---|---|
orderKey | Código de identificação do pedido, sendo uma "string" |
A seguir, alguns dos erros comuns que podem ser apresentados ao lidar com requisições HTTP e suas respectivas respostas:
O código de status HTTP 400, conhecido como "Bad Request" (Requisição Inválida), indica que o servidor não pôde processar a requisição do cliente devido a uma sintaxe inválida, estrutura malformada ou dados inválidos presentes na requisição.
01. Formando inválido do JSON esperado.
{ "success": true, "error": null, "integrationHubServiceId": "644a4d3c-6d2c-4154-a089-c1ab3fd89151", "orderKeyType": "String", "orderKey": [ "06" ], "consumption": [ { "orderId": "542e6b3e-8e63-4498-bdc8-1e334a22012e", "type": "TABLE", "createdAt": "2024-02-08 10:12:05", "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": { "waiterCode": 9999, "tableNumber": 6, "chairNumber": 0 }, "card": null } ] } |
{ "errors": [ { "key": "orderKeyType", "message": "body.orderKeyType must be one of [ORDER_ID, TABLE, CARD]" } ] } |
02. JSON enviando faltando um ou mais campos.
{ "integrationHubServiceId": "644a4d3c-6d2c-4154-a089-c1ab3fd89151", "orderKeyType": "String", "orderKey": [ "06" ], "consumption": [ { "orderId": "542e6b3e-8e63-4498-bdc8-1e334a22012e", "type": "TABLE", "createdAt": "2024-02-08 10:12:05", "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": { "waiterCode": 9999, "tableNumber": 6, "chairNumber": 0 }, "card": null } ] } |
{ "errors": [ { "key": "success", "message": "body.success is required" } ] } |
A solicitação é inválida e não pôde ser processada devido a erros na entrada fornecida. Verifique os dados enviados e tente novamente. |
O código de status HTTP 401, conhecido como "Unauthorized" (Não Autorizado), indica que a requisição não foi aplicada porque carece de credenciais de autenticação válidas para o recurso alvo. Diferente do código 403 (Forbidden), que significa que o servidor entendeu a requisição, mas se recusa a autorizá-la, o 401 é usado especificamente quando a autenticação é necessária e falhou ou ainda não foi fornecida.
A solicitação não pôde ser processada porque o usuário não possui as permissões necessárias. Verifique suas credenciais e tente novamente. |
O código de status HTTP 403, conhecido como "Forbidden" (Proibido), indica que o servidor não entendeu a requisição do cliente por está tentando acessar uma URL
incorreta
https://api-barramento.meuelevestage.com/order/consumptionS |
{ "integrationHubServiceId": "1188f64e-3ce8-45be-882c-6c8dcfcb70d4", "orderKeyType": "TABLE", "orderKey": ["09"] } |
O cliente não enviou uma requisição para a |
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 ocorrer quando o token
da requisição da autenticação, é diferente do token
gerado utilizando o integrationHubId
diferente do corpo da requisição.
{ "success": true, "error": null, "integrationHubServiceId": "644a4d3c-6d2c-4154-a089-c1ab3fd891513", "orderKeyType": "TABLE", "orderKey": [ "06" ], "consumption": [ { "orderId": "542e6b3e-8e63-4498-bdc8-1e334a22012e", "type": "TABLE", "createdAt": "2024-02-08 10:12:05", "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": { "waiterCode": 9999, "tableNumber": 6, "chairNumber": 0 }, "card": null } ] } |
{ "Message": "User is not authorized to access this resource with an explicit deny" } |
Uma ou mais informações enviadas não puderam ser encontradas. |