...
Bloco de código |
---|
title | JSON para pedido com item fracionado |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812",
"data": {
"id": "f853a079-d0cb-4612-847f-430460485c02",
"type": "CARD",
"displayId": "29",
"createdAt": "2024-06-24T17:35:00",
"orderTiming": "2024-06-24T17:40:24",
"preparationStartDateTime": "2024-06-24T18:00:00",
"merchant": {
"id": "3d0cbd44-a6c4-469c-8ab3-c83700672ee1",
"name": "BOTECO DO ALBINO"
},
"items": [
{
"id": "3973594022",
"index": "22",
"name": "MARACUJA",
"externalCode": "58",
"unit": "UN",
"quantity": 0.5,
"specialInstructions": "Teste",
"unitPrice": {
"value": 61.00,
"currency": "R$"
},
"optionsPrice": {
"value": 0.0,
"currency": "R$"
},
"totalPrice": {
"value": 30.50,
"currency": "R$"
},
"otherFees": []
}
],
"total": {
"items": 30.50,
"otherFees": 0,
"discount": 0.00,
"orderAmount": 20.50,
"additionalFees": 0,
"deliveryFee": 0
},
"payments": {null,
"prepaiddelivery": 0.0null,
"pendingextraInfo": 0.0"Teste",
"methodsschedule": [
{null,
"valueindoor": 30.50null,
"currencytakeout": "BRL"null,
"typetable": "PREPAID"null,
"methodcard": "credit",
{
"methodInfowaiterCode": "Visa"9999,
"changeForcardNumber": 0.0
}
]
},
"delivery29,
"deliveryTableNumber": null,29
"extraInfo": "Teste",
"schedule": null,
"indoor": null,
"takeout": null,
"table": null,
"card": {
"waiterCode": 9999,
"cardNumber": 29,
"deliveryTableNumber": 29
}
}
} |
Nota |
---|
title | Nota: HTTP Status Code = 200 OK |
---|
|
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:
...
Nota |
---|
title | Nota: HTTP Status Code = 200 OK |
---|
|
Sua solicitação foi aceita mas ainda não processada, aguarde alguns instantes e procure o status. |
...
04. ERROS
A seguir, alguns dos erros comuns que podem ser apresentados ao lidar com requisições HTTP e suas respectivas respostas:
- HTTP Status Code - 400 - Bad Request
Âncora |
---|
| status_code_400 |
---|
| status_code_400 |
---|
|
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 |
---|
title | JSON Inválido |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812",
"data": {
"id": "f853a079-d0cb-4612-847f-430460485c02",
"type": "CARD",
"displayId": 29,
"createdAt": "2024-06-24T17:35:00",
"orderTiming": "2024-06-24T17:40:24",
"preparationStartDateTime": "2024-06-24T18:00:00",
"merchant": {
"id": "3d0cbd44-a6c4-469c-8ab3-c83700672ee1",
"name": "BOTECO DO ALBINO"
},
"items": [
{
"id": "3973594022",
"index": "22",
"name": "MARACUJA",
"externalCode": "58",
"unit": "UN",
"quantity": 0.5,
"specialInstructions": "Teste",
"unitPrice": {
"value": 61.00,
"currency": "R$"
},
"optionsPrice": {
"value": 0.0,
"currency": "R$"
},
"totalPrice": {
"value": 30.50,
"currency": "R$"
},
"otherFees": []
}
],
"total": {
"items": 30.50,
"otherFees": 0,
"discount": 0.00,
"orderAmount": 20.50,
"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 |
---|
title | JSON Resposta |
---|
linenumbers | true |
---|
|
{
"errors": [
{
"key": "displayId",
"message": "body.data.displayId must be a string"
}
]
} |
...
02. JSON enviando faltando um ou mais campos.
Bloco de código |
---|
title | JSON Inválido |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812",
"data": {
"id": "f853a079-d0cb-4612-847f-430460485c02",
"type": "CARD",
"displayId": "29",
"createdAt": "2024-06-24T17:35:00",
"orderTiming": "2024-06-24T17:40:24",
"preparationStartDateTime": "2024-06-24T18:00:00",
"items": [
{
"id": "3973594022",
"index": "22",
"name": "MARACUJA",
"externalCode": "58",
"unit": "UN",
"quantity": 0.5,
"specialInstructions": "Teste",
"unitPrice": {
"value": 61.00,
"currency": "R$"
},
"optionsPrice": {
"value": 0.0,
"currency": "R$"
},
"totalPrice": {
"value": 30.50,
"currency": "R$"
},
"otherFees": []
}
],
"total": {
"items": 30.50,
"otherFees": 0,
"discount": 0.00,
"orderAmount": 20.50,
"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 |
---|
title | JSON Resposta |
---|
linenumbers | true |
---|
|
{
"errors": [
{
"key": "merchant",
"message": "body.data.merchant is required"
}
]
} |
Nota |
---|
title | Nota: HTTP Status Code = 400 Bad Request |
---|
|
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. |
...
- HTTP Status Code 401 - Unauthorized
Âncora |
---|
| status_code_401 |
---|
| status_code_401 |
---|
|
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 |
---|
title | Nota: HTTP Status Code = 401 Unauthorized |
---|
|
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. |
...
- HTTP Status Code 403 - Forbidden
Âncora |
---|
| status_code_403 |
---|
| status_code_403 |
---|
|
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 |
---|
title | URL enviada incorreda |
---|
|
https://api-barramento.meuelevestage.com/order/newOrderS |
Bloco de código |
---|
title | JSON Response para URL incorreta |
---|
linenumbers | true |
---|
|
{
"message": "Missing Authentication Token"
} |
Nota |
---|
title | Nota: HTTP Status Code = 403 - Forbidden |
---|
|
O cliente não enviou uma requisição para a URL incorreta. |
...
- HTTP Status Code 404 - Not Found
Âncora |
---|
| status_code_404 |
---|
| status_code_404 |
---|
|
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 |
---|
title | Integration Hub Code Inválido |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceId": "f1b874af-96ab-4535-aac3-25118fe586cc",
"data": {
"id": "f853a079-d0cb-4612-847f-430460485c02",
"type": "CARD",
"displayId": "29",
"createdAt": "2024-06-24T17:35:00",
"orderTiming": "2024-06-24T17:40:24",
"preparationStartDateTime": "2024-06-24T18:00:00",
"merchant": {
"id": "3d0cbd44-a6c4-469c-8ab3-c83700672ee1",
"name": "BOTECO DO ALBINO"
},
"items": [
{
"id": "3973594022",
"index": "22",
"name": "MARACUJA",
"externalCode": "58",
"unit": "UN",
"quantity": 0.5,
"specialInstructions": "Teste",
"unitPrice": {
"value": 61.00,
"currency": "R$"
},
"optionsPrice": {
"value": 0.0,
"currency": "R$"
},
"totalPrice": {
"value": 30.50,
"currency": "R$"
},
"otherFees": []
}
],
"total": {
"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 |
---|
title | JSON Inválido |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812",
"data": {
"id": "f853a079-d0cb-4612-847f-430460485c02",
"type": "CARD",
"displayId": 29,
"createdAt": "2024-06-24T17:35:00",
"orderTiming": "2024-06-24T17:40:24",
"preparationStartDateTime": "2024-06-24T18:00:00",
"merchant": {
"id": "3d0cbd44-a6c4-469c-8ab3-c83700672ee1",
"name": "BOTECO DO ALBINO"
},
"items": [
{
"id": "3973594022",
"index": "22",
"name": "MARACUJA",
"externalCode": "58",
"unit": "UN",
"quantity": 0.5,
"specialInstructions": "Teste",
"unitPrice": {
"value": 61.00,
"currency": "R$"
},
"optionsPrice": {
"value": 0.0,
"currency": "R$"
},
"totalPrice": {
"value": 30.50,
"currency": "R$"
},
"otherFees": []
}
],
"total": {
"items": 30.50,
"otherFees": 0,
"discount": 0.00,
"orderAmount": 20.50,
"additionalFees": 0,
"deliveryFee": 0
},
"payments": {
"prepaid": 0.0,
"pending": 0.0,
"methods": [
{
"value": 30.50,
"currency": "BRL",
"type": "PREPAID",
"method": "credit",
"methodInfo": "Visa",
"changeFor": 0.0
}
]
},
"delivery": null,
"extraInfo": "Teste",
"schedule": null,
"indoor": null,
"takeout": null,
"table": null,
"card": {
"waiterCode": 9999,
"cardNumber": 29,
"deliveryTableNumber": 29
}
}
} |
Bloco de código |
---|
title | JSON Resposta |
---|
linenumbers | true |
---|
|
{
"errors": [
{
"key": "displayId",
"message": "body.data.displayId must be a string"
}
]
} |
02. JSON enviando faltando um ou mais campos.
Bloco de código |
---|
title | JSON Inválido |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812",
"data": {
"id": "f853a079-d0cb-4612-847f-430460485c02",
"type": "CARD",
"displayId": "29",
"createdAt": "2024-06-24T17:35:00",
"orderTiming": "2024-06-24T17:40:24",
"preparationStartDateTime": "2024-06-24T18:00:00",
"items": [
{
"id": "3973594022",
"index": "22",
"name": "MARACUJA",
"externalCode": "58",
"unit": "UN",
"quantity": 0.5,
"specialInstructions": "Teste",
"unitPrice": {
"value": 61.00,
"currency": "R$"
},
"optionsPrice": {
"value": 0.0,
"currency": "R$"
},
"totalPrice": {
"value": 30.50,
"currency": "R$"
},
"otherFees": []
}
],
"total": {
"items": 30.50,
"otherFees": 0,
"discount": 0.00,
"orderAmount": 20.50,
"additionalFees": 0,
"deliveryFee": 0
},
"payments": {
"prepaid": 0.0,
"pending": 0.0,
"methods": [
{
"value": 30.50,
"currency": "BRL",
"type": "PREPAID",
"method": "credit",
"methodInfo": "Visa",
"changeFor": 0.0
}
]
},
"delivery": null,
"extraInfo": "Teste",
"schedule": null,
"indoor": null,
"takeout": null,
"table": null,
"card": {
"waiterCode": 9999,
"cardNumber": 29,
"deliveryTableNumber": 29
}
}
} |
Bloco de código |
---|
title | JSON Resposta |
---|
linenumbers | true |
---|
|
{
"errors": [
{
"key": "merchant",
"message": "body.data.merchant is required"
}
]
} |
Nota |
---|
title | Nota: HTTP Status Code = 400 Bad Request |
---|
|
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.
Nota |
---|
title | Nota: HTTP Status Code = 401 Unauthorized |
---|
|
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
Bloco de código |
---|
title | URL enviada incorreda |
---|
|
https://api-barramento.meuelevestage.com/order/newOrderS |
Bloco de código |
---|
title | JSON Response para URL incorreta |
---|
linenumbers | true |
---|
|
{
"message": "Missing Authentication Token"
} |
Nota |
---|
title | Nota: HTTP Status Code = 403 - Forbidden |
---|
|
O cliente não enviou uma requisição para a URL incorreta. |
...
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 |
---|
title | Integration Hub Code Inválido |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceId": "f1b874af-96ab-4535-aac3-25118fe586cc",
"data": {
"id": "f853a079-d0cb-4612-847f-430460485c02",
"type": "CARD",
"displayId": "29",
"createdAt": "2024-06-24T17:35:00",
"orderTiming": "2024-06-24T17:40:24",
"preparationStartDateTime": "2024-06-24T18:00:00",
"merchant": {
"id": "3d0cbd44-a6c4-469c-8ab3-c83700672ee1",
"name": "BOTECO DO ALBINO"
},
"items": [
{
"id": "3973594022",
"index": "22",
"name": "MARACUJA",
"externalCode": "58",
"unit": "UN",
"quantity": 0.5,
"specialInstructions": "Teste",
"unitPrice": {
"value": 61.00,
"currency": "R$"
},
"optionsPrice": {
"value": 0.0,
"currency": "R$"
},
"totalPrice": {
"value": 30.50,
"currency": "R$"
},
"otherFees": []
}
],
"total": {
"items": 30.50,
"otherFees": 0,
"discount": 0.00,
"orderAmount": 20.50,
"additionalFees": 0,
"deliveryFee": 0
},
"payments": {
"prepaid": 0.0,
"pending": 0.0,
"methods": [
{
"value": 30.50,
"currencyotherFees": "BRL"0,
"typediscount": "PREPAID"0.00,
"methodorderAmount": "credit"20.50,
"methodInfoadditionalFees": "Visa"0,
"changeFordeliveryFee": 0.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 newOrder , incluindo a estrutura do corpo da requisição para itens com valor fracionando acesse a documentação clicando aqui. |
Dica |
---|
|
Para obter detalhes técnicos sobre o envio de requisições ao endpoint newOrder , incluindo a estrutura do corpo da requisição para itens com valor fracionando, adicionais e descontos acesse a documentação clicando aqui. |
...
05. LINKS