CONTEÚDO
01. VISÃO GERAL
Essa documentação tem como finalidade demonstrar o formato do JSON para envio de requisições de pedidos, como valor integração e adicionais.
...
02.
...
EXEMPLO DE UTILIZAÇÃO
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 integralEstrutura do corpo da requisição para criação de novos pedidos com itens de valor integral e adiconais
Bloco de código |
---|
title | JSON para pedido com inteiro |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812",
"data": {
"id": "f4114e16-c2e4-4dc3-86f3-98a52bfd5d7d",
"type": "TABLECARD",
"displayId": "5829",
"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": 01.000,
"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$"
},
"currency": "R$"
},
"productionPoint": "Teste"
}
}
]
}
],
"otherFees": [],
"total": {
"items": 70.90,
"otherFees": 0,
"discount": 0.0,
"orderAmount": 70.90,
"additionalFees": 0,
"deliveryFee": 0
},
"payments": {null,
"prepaiddelivery": 0.0null,
"pendingextraInfo": 0.0"Teste",
"methodsschedule": [null,
{
"value"indoor": 70.90null,
"currencytakeout": "BRL"null,
"typetable": null,
"PREPAIDcard",: {
"methodwaiterCode": "credit"9999,
"methodInfocardNumber": "Visa"29,
"changeFordeliveryTableNumber": 0.029
}
]}
},
"delivery": null,
"extraInfo": "Teste",
"schedule": null,
"indoor": null,
"takeout": null,
"table": {
"waiterCode": "9999",
"tableNumber": "57",
"chairNumber": "1"
},
"card": null
}
} |
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.
...
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. |
...
03. 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.
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 |
---|
title | JSON Inválido |
---|
linenumbers | true |
---|
|
{
"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": |
...
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": "b1e26dd8-0a1b-486e-bf62-65e80ddce2f4",
"type": "TABLE",
"displayId": 55,
"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": "54",
"index": "54",
"name": "MARACUJA",
"externalCode": "58",
"unit": "UN",
"quantity": 1.0,
"specialInstructions": "Teste",
"unitPrice": {
"value": 6169.0090,
"currency": "R$"
},
"optionsPriceoptions": [
{
"valueindex": 0.0"61",
"currencyid": "R$61",
},
"totalPricename": {"COMPOSICAO A",
"valueexternalCode": 61.00"201",
"currencyunit": "R$UN",
}
}
],
"otherFees"quantity": []1,
"totalunitPrice": {
"itemsvalue": 611.000,
"otherFeescurrency": 0"R$"
},
"discountoriginalPrice": 0.0,{
"orderAmountvalue": 611.000,
"additionalFeescurrency": 0,"R$"
"deliveryFee": 0
},
"paymentstotalPrice": {
"prepaidvalue": 01.000,
"pending": 0.0,
"methodscurrency": ["R$"
{
"value": 61.0},
"currencyproductionPoint": "BRLTeste",
"type": "PREPAID",
}
]
"method": "credit",}
],
"methodInfootherFees": "Visa"[],
"total": {
"changeForitems": 070.090,
}"otherFees": 0,
]"discount": 0.0,
},
"deliveryorderAmount": null70.90,
"extraInfoadditionalFees": "Teste"0,
"scheduledeliveryFee": null0
},
"indoorpayments": null,
"takeoutdelivery": null,
"tableextraInfo": {"Teste",
"waiterCodeschedule": null,
"9999indoor": null,
"tableNumbertakeout": null,
"54table": null,
"chairNumbercard": {
"1waiterCode": 9999,
}"cardNumber": 29,
"carddeliveryTableNumber": null29
}
}
} |
Bloco de código |
---|
title | JSON Resposta |
---|
linenumbers | true |
---|
|
{
"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 02. JSON enviando 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 |
---|
title | JSON Inválido |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812",
"data": {
"id": "fa3a2d45f4114e16-3a29c2e4-41364dc3-95e786f3-692d93db8b2b98a52bfd5d7d",
"type": "TABLECARD",
"displayId": "5558",
"createdAt": "2024-06-24T17:35:00",
"orderTiming": "2024-06-24T17:40:24",
"preparationStartDateTime": "2024-06-24T18:00:00",
"items": [
{
"id": "5461",
"index": "5460",
"name": "MARACUJAA FRANCESA",
"externalCode": "581",
"unit": "UN",
"quantity": 1.0,
"specialInstructions": "Teste",
"unitPrice": {
"value": 6169.0090,
"currency": "R$"
},
"optionsPrice": {
"value": 0.0,
"currency": "R$"
},
"totalPrice": {
"value": 6169.0090,
"currency": "R$"
},
}
],
"otherFees"options": [],
"total": {
"itemsindex": "61.0",
"otherFeesid": 0"61",
"discountname": 0.0"COMPOSICAO A",
"orderAmountexternalCode": 61.0"201",
"additionalFeesunit": 0"UN",
"deliveryFeequantity": 01,
},
"paymentsunitPrice": {
"prepaidvalue": 01.000,
"pending": 0.0,
"methodscurrency": ["R$"
{ },
"valueoriginalPrice": 61.0,{
"currencyvalue": "BRL"1.00,
"typecurrency": "PREPAID"R$"
},
"methodtotalPrice": "credit"{
"value": 1.00,
"methodInfocurrency": "Visa"R$"
},
"changeForproductionPoint": 0.0
"Teste"
}
]
},
"delivery": null],
"extraInfootherFees": "Teste"[],
"scheduletotal": null,{
"indooritems": null70.90,
"takeoutotherFees": null0,
"tablediscount": {0.0,
"waiterCodeorderAmount": "9999"70.90,
"tableNumberadditionalFees": "54"0,
"chairNumberdeliveryFee": "1"0
},
"cardpayments": null,
}
} |
Bloco de código |
---|
title | JSON Resposta |
---|
linenumbers | true |
---|
|
{
"errors": [
{
"key": "merchant",
"message": "body.data.merchant is required"
}
]
} |
"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 |
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 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. |
...
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": "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": {
|
...
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": "f1bddb3f-63c4-4b2f-be53-e4527275ad9d",
"type": "TABLE",
"displayId": "55",
"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": "54",
"index": "54",
"name": "MARACUJA",
"externalCode": "58",
"unit": "UN",
"quantity": 1.0,
"specialInstructions": "Teste",
"unitPrice": {
"value": 61.00,
"currency": "R$"
},
"optionsPrice": {
"value": 01.000,
"currency": "R$"
},
"totalPriceoriginalPrice": {
"value": 611.00,
"currency": "R$"
}
},
],
"otherFees": [],
"totaltotalPrice": {
"itemsvalue": 611.000,
"otherFeescurrency": 0,"R$"
"discount": 0.0,
"orderAmount": 61.0},
"additionalFeesproductionPoint": 0,"Teste"
"deliveryFee": 0
},
"payments": { ]
"prepaid": 0.0}
],
"pendingotherFees": 0.0[],
"methodstotal": [
{
"valueitems": 6170.090,
"currencyotherFees": "BRL"0,
"typediscount": "PREPAID"0.0,
"methodorderAmount": "credit"70.90,
"methodInfoadditionalFees": "Visa"0,
"changeFordeliveryFee": 0.0
},
]
}"payments": null,
"delivery": null,
"extraInfo": "Teste",
"schedule": null,
"indoor": null,
"takeout": null,
"table": null,
"card": {
"waiterCode": "9999",
"tableNumbercardNumber": "54"29,
"chairNumberdeliveryTableNumber": "1"29
},
"card": null
}
} |
Bloco de código |
---|
title | JSON Response |
---|
linenumbers | true |
---|
|
{
"errors": [
{
"key": "integrationHubServiceId",
"message": "Provider Merchant for integrationHubServiceId \"f1b874af-96ab-4535-aac3-25118fe586cc\" not found or disabled"
}
]
} |
...
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 integral 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 integral, adicionais e descontos 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 integral, adicionais, descontos e taxa acesse a documentação clicando aqui. |
...
...
04. LINKS