CONTEÚDO - NÃO MEXE API
Âncora | ||||
---|---|---|---|---|
|
Este endpoint é utilizado Esta documentação tem como finalidade demonstrar o formato JSON para envio de requisição para novos pedidos requisições de pedidos com vários itens na API Order mesa via barramento, para envio de um pedido com vários itens com valor integralMesa, utilizando o endpoint newOrder.
...
Âncora | ||||
---|---|---|---|---|
|
Método | URL |
---|---|
POST | https://api-barramento.meuelevestage.com/order/newOrder |
...
Âncora | ||||
---|---|---|---|---|
|
01. Corpo da requisição para envio de vários itens no mesmo pedido:
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "integrationHubServiceId": "ab8aa1e73fea8768-cfe2bbd9-4fdf454b-80999e7b-af7da88274ba40841e9a6812", "data": { "id": "29261444-5ff8-40b2-bce1-42848247d4a2", "type": "TABLE", "displayId": "8", "createdAt": "2024-06-24T17:35:00", "orderTiming": "2024-06-24T17:40:24", "preparationStartDateTime": "2024-06-24T18:00:00", "merchant": { "id": "c312d2ff-1a8f-40ad-8eed-9ae9a908df6e", "name": "BOTECO DO ALBINO" }, "items": [ { "id": "2", "index": "2", "name": "A FRANCESA", "externalCode": "1", "unit": "UN", "quantity": 1, "specialInstructions": "Teste", "unitPrice": { "value": 69.90, "currency": "R$" }, "optionsPrice": { "value": 1.00, "currency": "R$" }, "totalPrice": { "value": 69.90, "currency": "R$" } }, { "id": "4", "index": "4", "name": "AERADO", "externalCode": "2", "unit": "UN", "quantity": 1, "specialInstructions": "Teste", "unitPrice": { "value": 32.99, "currency": "R$" }, "optionsPrice": { "value": 37.99, "currency": "R$" }, "totalPrice": { "value": 32.99, "currency": "R$" } } ], "otherFees": [], "discounts": [], "total": { "items": 102.89, "otherFees": 38.99, "discount": 0.00, "orderAmount": 141.88, "additionalFees": 0, "deliveryFee": 0 }, "payments": {null, "prepaiddelivery": 0.0null, "pendingextraInfo": 0.0"Teste", "methodsschedule": [null, { "indoor": null, "valuetakeout": 141.88null, "currencytable": "BRL",{ "typewaiterCode": "PREPAID141.88", "methodtableNumber": "credit8", "methodInfochairNumber": "Visa1", }, "changeForcard": 0.0 } ] }, "delivery": null, "extraInfo": "Teste", "schedule": null, "indoor": null, "takeout": null, "table": { "waiterCode": "141.88", "tableNumber": "8", "chairNumber": "1" }, "card": null } } |
Nota | ||
---|---|---|
| ||
Sua solicitação foi aceita mas ainda não processada, aguarde alguns instantes e procure o status. |
A seguir, alguns dos erros comuns que podem ser apresentados ao lidar com requisições HTTP e suas respectivas respostas:
...
null
}
} |
Nota | ||
---|---|---|
| ||
Sua solicitação foi aceita mas ainda não processada, aguarde alguns instantes e procure o status. |
...
Âncora | ||||
---|---|---|---|---|
|
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.
01. Formando inválido do JSON esperado.
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812a",
"data": {
"id": "29261444-5ff8-40b2-bce1-42848247d4a2",
"type": "TABLE",
"displayId": 8,
"createdAt": "2024-06-24T17:35:00",
"orderTiming": "2024-06-24T17:40:24",
"preparationStartDateTime": "2024-06-24T18:00:00",
"merchant": {
"id": "c312d2ff-1a8f-40ad-8eed-9ae9a908df6e",
"name": "BOTECO DO ALBINO"
},
"items": [ |
...
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.
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "integrationHubServiceId": "ab8aa1e7-cfe2-4fdf-8099-af7da88274ba", "data": { "id": "29261444-5ff8-40b2-bce1-42848247d4a2", "type": "TABLE", "displayId": 8, "createdAt": "2024-06-24T17:35:00", "orderTiming": "2024-06-24T17:40:24", "preparationStartDateTime": "2024-06-24T18:00:00", "merchant": { "id": "c312d2ff-1a8f-40ad-8eed-9ae9a908df6e", "name": "BOTECO DO ALBINO" }, "items": [ { "id": "2", "index": "2", "name": "A FRANCESA", "externalCode": "1", "unit": "UN", "quantity": 1, "specialInstructions": "Teste", "unitPrice": { "value": 69.90, "currency": "R$" }, "optionsPrice": { "value": 1.00, "currency": "R$" }, "totalPrice": { "value": 69.90, "currency": "R$" } }, { "id": "42", "index": "42", "name": "AERADOA FRANCESA", "externalCode": "21", "unit": "UN", "quantity": 1, "specialInstructions": "Teste", "unitPrice": { "value": 3269.9990, "currency": "R$" }, "optionsPrice": { "value": 371.9900, "currency": "R$" }, "totalPrice": { "value": 3269.9990, "currency": "R$" } }, ],{ "otherFeesid": []"4", "discounts": [], "totalindex": { "items4": 102.89, "otherFeesname": 38.99"AERADO", "discountexternalCode": 0.00"2", "orderAmountunit": 141.88"UN", "additionalFeesquantity": 01, "deliveryFeespecialInstructions": 0"Teste", }, "paymentsunitPrice": { "prepaidvalue": 032.099, "pendingcurrency": 0.0,"R$" "methods": [ }, "optionsPrice": { "value": 14137.8899, "currency": "BRL"R$" }, "typetotalPrice": "PREPAID",{ "methodvalue": "credit"32.99, "methodInfocurrency": "Visa",R$" } } ], "changeForotherFees": 0.0[], } ]"discounts": [], },"total": { "deliveryitems": null102.89, "extraInfootherFees": "Teste"38.99, "schedulediscount": null0.00, "indoororderAmount": null141.88, "takeoutadditionalFees": null0, "tabledeliveryFee": {0 }, "waiterCodepayments": "141.88"null, "delivery": null, "tableNumberextraInfo": "8Teste", "chairNumberschedule": "1"null, }"indoor": null, "cardtakeout": null, } } | ||||
Bloco de código | ||||
| ||||
{ "errorstable": [ { "keywaiterCode": "displayId141.88", "messagetableNumber": "body.data.displayId must be a string8", "chairNumber": "1" }, "card": null ]} } |
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "integrationHubServiceIderrors": "ab8aa1e7-cfe2-4fdf-8099-af7da88274ba", "data": { "id": "29261444-5ff8-40b2-bce1-42848247d4a2",[ { "typekey": "TABLEdisplayId", "displayIdmessage": "body.data.displayId must be a string" } ] } |
...
02. JSON enviando faltando um ou mais campos.
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "integrationHubServiceId8", "createdAt": "20243fea8768-bbd9-06-24T17:35:00454b-9e7b-40841e9a6812", "orderTimingdata": "2024-06-24T17:40:24",{ "preparationStartDateTimeid": "2024-06-24T18:00:0029261444-5ff8-40b2-bce1-42848247d4a2", "itemstype": [ {"TABLE", "iddisplayId": "28", "indexcreatedAt": "22024-06-24T17:35:00", "nameorderTiming": "A FRANCESA2024-06-24T17:40:24", "externalCodepreparationStartDateTime": "12024-06-24T18:00:00", "unititems": "UN",[ "quantity": 1,{ "specialInstructionsid": "Teste2", "unitPriceindex": {"2", "valuename": 69.90"A FRANCESA", "currencyexternalCode": "R$" }1", "optionsPriceunit": {"UN", "valuequantity": 1.00, "currencyspecialInstructions": "R$" }Teste", "totalPriceunitPrice": { "value": 69.90, "currency": "R$" }, }, "optionsPrice": { "idvalue": "4"1.00, "indexcurrency": "4"R$" }, "nametotalPrice": "AERADO",{ "externalCodevalue": "2"69.90, "unitcurrency": "UNR$", } "quantity": 1 }, { "specialInstructionsid": "Teste4", "unitPriceindex": {"4", "valuename": 32.99"AERADO", "currencyexternalCode": "R$" }2", "optionsPriceunit": {"UN", "valuequantity": 37.991, "currencyspecialInstructions": "R$" }Teste", "totalPriceunitPrice": { "value": 32.99, "currency": "R$" } } ], "otherFees": [], "discountsoptionsPrice": [],{ "total": { "itemsvalue": 10237.8999, "otherFees": 38.99, "discountcurrency": 0.00"R$" }, "orderAmounttotalPrice": 141.88,{ "additionalFeesvalue": 032.99, "deliveryFeecurrency": 0"R$" }, } "payments": { } "prepaid": 0.0], "pendingotherFees": 0.0[], "methodsdiscounts": [], "total": { "valueitems": 141102.8889, "currencyotherFees": "BRL"38.99, "typediscount": "PREPAID"0.00, "methodorderAmount": "credit"141.88, "methodInfoadditionalFees": "Visa"0, "changeFordeliveryFee": 0.0 } ]}, }"payments": null, "delivery": null, "extraInfo": "Teste", "schedule": null, "indoor": null, "takeout": null, "table": { "waiterCode": "141.88", "tableNumber": "8", "chairNumber": "1" }, "card": null } } |
...
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/newOrderS |
...
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 integrationHubId
está incorreto ou inválido.
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "integrationHubServiceId": "709aa0b2-2b89-4d06-9f12-c3b8c275d9fa", "data": { "id": "29261444-5ff8-40b2-bce1-42848247d4a2{ "integrationHubServiceId": "709aa0b2-2b89-4d06-9f12-c3b8c275d9fa", "data": { "id": "29261444-5ff8-40b2-bce1-42848247d4a2", "type": "TABLE", "displayId": "8", "createdAt": "2024-06-24T17:35:00", "orderTiming": "2024-06-24T17:40:24", "preparationStartDateTimetype": "2024-06-24T18:00:00", "merchant": { TABLE", "iddisplayId": "c312d2ff-1a8f-40ad-8eed-9ae9a908df6e8", "namecreatedAt": "BOTECO DO ALBINO" }2024-06-24T17:35:00", "itemsorderTiming": ["2024-06-24T17:40:24", { "id"preparationStartDateTime": "22024-06-24T18:00:00", "indexmerchant": "2",{ "nameid": "A FRANCESAc312d2ff-1a8f-40ad-8eed-9ae9a908df6e", "externalCodename": "1BOTECO DO ALBINO", }, "unititems": "UN",[ "quantity": 1,{ "specialInstructionsid": "Teste2", "unitPriceindex": {"2", "valuename": 69.90 "A FRANCESA", "currencyexternalCode": "R$" }1", "optionsPriceunit": {"UN", "valuequantity": 1.00, "currencyspecialInstructions": "R$" }Teste", "totalPriceunitPrice": { "value": 69.90, "currency": "R$" }, }, "optionsPrice": { "idvalue": "4"1.00, "indexcurrency": "4"R$" }, "nametotalPrice": "AERADO",{ "externalCodevalue": "2"69.90, "unitcurrency": "UNR$", } "quantity": 1}, { "specialInstructionsid": "Teste4", "unitPriceindex": {"4", "valuename": 32.99"AERADO", "currencyexternalCode": "R$" }2", "optionsPriceunit": {"UN", "valuequantity": 37.991, "currencyspecialInstructions": "R$" }Teste", "totalPriceunitPrice": { "value": 32.99, "currency": "R$" } } ], "otherFees": [], "discounts": [], "total": { "items": 102.89,optionsPrice": { "otherFeesvalue": 3837.99, "discountcurrency": 0.00"R$" }, "orderAmounttotalPrice": 141.88,{ "additionalFeesvalue": 032.99, "deliveryFeecurrency": 0"R$" }, "payments": { } "prepaid": 0.0], "pendingotherFees": 0.0[], "methodsdiscounts": [], "total": { "valueitems": 141102.8889, "currencyotherFees": "BRL"38.99, "typediscount": "PREPAID"0.00, "methodorderAmount": "credit"141.88, "methodInfoadditionalFees": "Visa"0, "changeFordeliveryFee": 0.0 }, ] }"payments": null, "delivery": null, "extraInfo": "Teste", "schedule": null, "indoor": null, "takeout": null, "table": { "waiterCode": "141.88", "tableNumber": "8", "chairNumber": "1" }, "card": null } } |
...
Dica | ||
---|---|---|
| ||
Para obter detalhes técnicos sobre o envio de requisições ao endpoint |
Dica | ||
---|---|---|
| ||
Para obter detalhes técnicos sobre o envio de requisições ao endpoint |
Dica | ||
---|---|---|
| ||
Para obter detalhes técnicos sobre o envio de requisições ao endpoint |
...
Âncora | ||||
---|---|---|---|---|
|
Templatedocumentos |
---|