CONTEÚDO
...
Âncora | ||||
---|---|---|---|---|
|
O endpoint Status da API Order Mesa é utilizado no ponto de venda (PDV) para obter o status dos pedidos. Este endpoint recebe o mesmo corpo de requisição utilizado pelo endpoint GetConsumption
- API Order Mesa - Get Consumption
...
Âncora | ||||
---|---|---|---|---|
|
Método | URL |
---|---|
POST | https://api-barramento.meuelevestage.com/order/consumption |
...
01. O corpo da requisição enviada para retornar um consumos especifico é o seguinte:
Âncora | ||||
---|---|---|---|---|
|
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"success": true,
"error": null,
"integrationHubServiceId": "03a93e31-1196-454b-b66f-55b7b6364339",
"orderKeyType": "TABLE",
"orderKey": [
"19"
],
"consumption": [
{
"orderId": "c5c1bf93-d112-4f4c-af3b-450b39519e12",
"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
}
]
} |
Nota | ||
---|---|---|
| ||
A solicitação foi processada com sucesso e o resultado foi retornado conforme esperado. |
...
02. Corpo da requisição para obter o status de múltiplos pedidos:
Âncora | ||||
---|---|---|---|---|
|
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"success": true,
"error": null,
"integrationHubServiceId": "03a93e31-1196-454b-b66f-55b7b6364339",
"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
}
]
} |
Dica | ||
---|---|---|
| ||
O corpo da requisição enviada é o mesmo que o corpo da resposta obtida através do endpoint |
Informações | ||
---|---|---|
| ||
Neste exemplo, os dados retornados incluem:
|
Dica | ||
---|---|---|
| ||
O corpo da requisição enviada é o mesmo que o corpo da resposta obtida através do endpoint |
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:
Âncora | ||||
---|---|---|---|---|
|
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.
Nota | ||
---|---|---|
| ||
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. |
...
Âncora | ||||
---|---|---|---|---|
|
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.
Nota | ||
---|---|---|
| ||
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. |
...
Âncora | ||||
---|---|---|---|---|
|
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
Bloco de código | ||
---|---|---|
| ||
https://api-barramento.meuelevestage.com/order/consumptionS |
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"integrationHubServiceId": "1188f64e-3ce8-45be-882c-6c8dcfcb70d4",
"orderKeyType": "TABLE",
"orderKey": ["09"]
} |
Nota | ||
---|---|---|
| ||
O cliente não enviou uma requisição para a |
...
Â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 ocorrer quando o token
da requisição da autenticação, é diferente do token
gerado utilizando o integrationHubId
diferente do corpo da requisição..
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"success": true,
"error": null,
"integrationHubServiceId": "5ffec6b8-1c55-4a7d-985f-12d13685b553",
"orderKeyType": "TABLE",
"orderKey": [
"06"
],
"consumption": [
{
"orderId": "86ebfa7f-db95-42ad-baf0-b2a5e0865c74",
"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
}
]
} |
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"Message": "User is not authorized to access this resource with an explicit deny"
} |
Nota | ||
---|---|---|
| ||
Uma ou mais informações enviadas não puderam ser encontradas. |
...
Âncora | ||||
---|---|---|---|---|
|
Esse endpoint serve para informar a consumação dos pedidos.
...
Templatedocumentos |
---|