...
Âncora | ||||
---|---|---|---|---|
|
Essa documentação tem como finalidade demonstrar o formato do JSON para envio de requisições de pedidos, como valor integração e adicionais.
...
Âncora | ||||
---|---|---|---|---|
|
2.1 - Request
...
Itens com Valor Integral e Adicionais:
Ao enviar a requisição para este endpoint, o sistema processa a criação de um novo pedido, incluindo itens de valor integral
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812", "data": { "id": "f4114e16-c2e4-4dc3-86f3-98a52bfd5d7d", "type": "CARD", "displayId": "29", "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": "61", "index": "60", "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$" }, "options": [ { "index": "61", "id": "61", "name": "COMPOSICAO A", "externalCode": "201", "unit": "UN", "quantity": 1, "unitPrice": { "value": 1.00, "currency": "R$" }, "originalPrice": { "value": 1.00, "currency": "R$" }, "totalPrice": { "value": 1.00, "currency": "R$" }, "productionPoint": "Teste" } ] } ], "otherFees": [], "total": { "items": 70.90, "otherFees": 0, "discount": 0.0, "orderAmount": 70.90, "additionalFees": 0, "deliveryFee": 0 }, "payments": null, "delivery": null, "extraInfo": "Teste", "schedule": null, "indoor": null, "takeout": null, "table": null, "card": { "waiterCode": 9999, "cardNumber": 29, "deliveryTableNumber": 29 } } } |
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:
...
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.
3.1 - Formato inválido do JSON esperado:
A requisição foi enviada com um JSON malformado ou inválido, o que impede o sistema de interpretá-la corretamente. Isso ocorre quando a estrutura JSON contém erros de sintaxe, como chaves ou colchetes incorretos
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812", "data": { "id": "f4114e16-c2e4-4dc3-86f3-98a52bfd5d7d", "type": "CARD", "displayId": 29, "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": "61", "index": "60", "name": "A FRANCESA", "externalCode": "1", "unit": "UN", "quantity": 1, "specialInstructions": "Teste", "unitPrice": { "value": 69.90, "currency": "R$" }, "optionsPrice": { "value": 0.0, "currency": "R$" }, "totalPrice": { "value": 69.90, "currency": "R$" }, "options": [ { "index": "61", "id": "61", "name": "COMPOSICAO A", "externalCode": "201", "unit": "UN", "quantity": 1, "unitPrice": { "value": 1.00, "currency": "R$" }, "originalPrice": { "value": 1.00, "currency": "R$" }, "totalPrice": { "value": 1.00, "currency": "R$" }, "productionPoint": "Teste" } ] } ], "otherFees": [], "total": { "items": 70.90, "otherFees": 0, "discount": 0.0, "orderAmount": 70.90, "additionalFees": 0, "deliveryFee": 0 }, "payments": null, "delivery": null, "extraInfo": "Teste", "schedule": null, "indoor": null, "takeout": null, "table": null, "card": { "waiterCode": 9999, "cardNumber": 29, "deliveryTableNumber": 29 } } } |
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "errors": [ { "key": "displayId", "message": "body.data.displayId must be a string" } ] } |
...
3.2 - JSON enviado com a ausência de um ou mais campos obrigatórios:
Se a requisição estiver faltando um ou mais campos obrigatórios, o servidor responderá com um erro 400. Cada campo requerido deve estar presente para que a operação seja processada corretamente.
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812", "data": { "id": "f4114e16-c2e4-4dc3-86f3-98a52bfd5d7d", "type": "CARD", "displayId": "58", "createdAt": "2024-06-24T17:35:00", "orderTiming": "2024-06-24T17:40:24", "preparationStartDateTime": "2024-06-24T18:00:00", "items": [ { "id": "61", "index": "60", "name": "A FRANCESA", "externalCode": "1", "unit": "UN", "quantity": 1, "specialInstructions": "Teste", "unitPrice": { "value": 69.90, "currency": "R$" }, "optionsPrice": { "value": 0.0, "currency": "R$" }, "totalPrice": { "value": 69.90, "currency": "R$" }, "options": [ { "index": "61", "id": "61", "name": "COMPOSICAO A", "externalCode": "201", "unit": "UN", "quantity": 1, "unitPrice": { "value": 1.00, "currency": "R$" }, "originalPrice": { "value": 1.00, "currency": "R$" }, "totalPrice": { "value": 1.00, "currency": "R$" }, "productionPoint": "Teste" } ] } ], "otherFees": [], "total": { "items": 70.90, "otherFees": 0, "discount": 0.0, "orderAmount": 70.90, "additionalFees": 0, "deliveryFee": 0 }, "payments": null, "delivery": null, "extraInfo": "Teste", "schedule": null, "indoor": null, "takeout": null, "table": null, "card": { "waiterCode": 9999, "cardNumber": 29, "deliveryTableNumber": 29 } } } |
...
Dica | ||
---|---|---|
| ||
Para obter detalhes técnicos sobre o envio de requisições ao endpoint |
...
Âncora | ||||
---|---|---|---|---|
|
...