...
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 | ||||
---|---|---|---|---|
| ||||
{
"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
}
]
} |
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"errors": [
{
"key": "orderKeyType",
"message": "body.orderKeyType must be one of [ORDER_ID, TABLE, CARD]"
}
]
} |
02. JSON enviando faltando um ou mais campos.
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"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
}
]
} |
Bloco de código | ||||
---|---|---|---|---|
| ||||
{
"errors": [
{
"key": "success",
"message": "body.success is required"
}
]
} |
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. |
...
Bloco de código | ||||
---|---|---|---|---|
| ||||
{ "success": true, "error": null, "integrationHubServiceId": "5ffec6b8644a4d3c-1c556d2c-4a7d4154-985fa089-12d13685b553c1ab3fd891513", "orderKeyType": "TABLE", "orderKey": [ "06" ], "consumption": [ { "orderId": "86ebfa7f542e6b3e-db958e63-42ad4498-baf0bdc8-b2a5e0865c741e334a22012e", "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 } ] } |
...