CONTEÚDO - NÃO MEXE API
01. VISÃO GERAL
Este endpoint é utilizado Esta documentação tem como finalidade demonstrar o formato JSON para envio de requisição para novos pedidos na API Order mesa via barramentrequisições de pedidos com vários itens, com um valor integral e adicionais na API Order Mesa, utilizando o endpoint newOrder.
...
02. ENDPOINT
Método | URL |
---|
POST | https://api-barramento.meuelevestage.com/order/newOrder |
...
03. EXEMPLO DE UTILIZAÇÃO
01. Corpo da requisição para envio de vários itens no mesmo pedido:
Bloco de código |
---|
title | JSON da requisição do vários itens no pedido |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceId": "82b90dff3fea8768-6d68bbd9-4fd1454b-8c599e7b-5f6623d2d45f40841e9a6812",
"data": {
"id": "9c3a693829261444-1e435ff8-4ed440b2-a6b6bce1-16560c43cf6842848247d4a2",
"type": "TABLE",
"displayId": "38",
"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": "152",
"index": "152",
"name": "A FRANCESA",
"externalCode": "1",
"unit": "UN",
"quantity": 1,
"specialInstructions": "Teste",
"unitPrice": {
"value": 69.90,
"currency": "R$"
},
"optionsPrice": {
"value": 01.00,
"currency": "R$"
},
"totalPrice": {
"value": 69.90,
"currency": "R$"
},
}, "options": [
{
"idindex": "173",
"indexid": "173",
"name": "MARACUJACOMPOSICAO A",
"externalCode": "58201",
"unit": "UN",
"quantity": 1,
"specialInstructions": "Teste",
"unitPrice": {
"value": 611.00,
"currency": "R$"
},
"optionsPriceoriginalPrice": {
"value": 01.00,
"currency": "R$RS"
},
"totalPrice": {
"value": 611.000,
"currency": "R$"
}
},
],
"otherFeesproductionPoint": [],
"discounts": []"Adicional Composicao A"
}
]
},
"total": {
"itemsid": 130.90"4",
"otherFeesindex": 0.00"4",
"discountname": 0.00"AERADO",
"orderAmountexternalCode": 130.90"2",
"additionalFeesunit": 0"UN",
"deliveryFeequantity": 01,
},
"paymentsspecialInstructions": {"Teste",
"prepaidunitPrice": 0.0,
{
"pendingvalue": 032.099,
"methodscurrency": ["R$"
{},
"valueoptionsPrice": 130.90,{
"currencyvalue": "BRL"37.99,
"typecurrency": "PREPAIDR$",
},
"methodtotalPrice": "credit"{
"value": 32.99,
"methodInfocurrency": "Visa"R$"
},
"changeForoptions": 0.0[
} {
]
},
"deliveryindex": null"5",
"extraInfoid": "Teste5",
"schedulename": null"AVELA",
"indoorexternalCode": null"4",
"takeoutunit": null"UN",
"tablequantity": {1,
"waiterCodeunitPrice": "9999",
{
"tableNumbervalue": "300"37.99,
"chairNumbercurrency": "1R$"
},
"cardoriginalPrice": 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. ERROS
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.
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"{
"value": 37.99,
"currency": "RS"
},
"totalPrice": {
"value": 37.99,
"currency": "R$"
},
"productionPoint": "Adicional Avela"
}
]
}
],
"otherFees": [],
"discounts": [],
"total": {
"items": 102.89,
"otherFees": 38.99,
"discount": 0.00,
"orderAmount": 141.88,
"additionalFees": 0,
"deliveryFee": 0
},
"itemspayments": [null,
{"delivery": null,
"idextraInfo": "54Teste",
"indexschedule": "54"null,
"nameindoor": "MARACUJA"null,
"externalCodetakeout": "58"null,
"unittable": "UN",{
"quantitywaiterCode": 1.0"8",
"specialInstructionstableNumber": "Teste8",
"unitPricechairNumber": {"1"
},
"valuecard": 61.00,
"currency": "R$"
},
"optionsPrice": {
"value": 0.0,
"currency": "R$"
},
"totalPrice": {
"value": 61.00,
"currency": "R$"
}
}
],
"otherFees": [],
"total": {
"items": 61.0,
"otherFees": 0,
"discount": 0.0,
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. 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": "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" "orderAmount": 61.0,
"additionalFees": 0,
"deliveryFee": 0
},
"paymentsitems": [
{
"prepaidid": 0.0"2",
"pendingindex": 0.0"2",
"methodsname": ["A FRANCESA",
{"externalCode": "1",
"valueunit": 61.0"UN",
"currencyquantity": "BRL"1,
"typespecialInstructions": "PREPAIDTeste",
"methodunitPrice": "credit",{
"methodInfovalue": "Visa"69.90,
"changeForcurrency": 0.0"R$"
},
]
},
"optionsPrice": {
"deliveryvalue": null1.00,
"extraInfocurrency": "TesteR$",
"schedule": null },
"indoortotalPrice": null,{
"takeoutvalue": null69.90,
"table": {
"waiterCodecurrency": "9999"R$"
},
"tableNumberoptions": "54",[
"chairNumber {
"index": "13",
},
"cardid": null
}
} |
Bloco de código |
---|
title | JSON Resposta |
---|
linenumbers | true |
---|
|
{
"errors": [
{
"3",
"name": "COMPOSICAO A",
"keyexternalCode": "displayId201",
"messageunit": "body.data.displayId must be a string"UN",
}
]
} |
02. JSON enviando faltando um ou mais campos.
Bloco de código |
---|
title | JSON Inválido |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceId": "299f76ba-3ac3-4cc1-abaf-fac5a2510d8c",
"data "quantity": 1,
"unitPrice": {
"idvalue": "fa3a2d45-3a29-4136-95e7-692d93db8b2b"1.00,
"typecurrency": "TABLE"R$"
},
"displayIdoriginalPrice": "55",
{
"createdAtvalue": "2024-06-24T17:35:00"1.00,
"orderTimingcurrency": "2024-06-24T17:40:24",
"preparationStartDateTime": "2024-06-24T18:00:00",
"items": [RS"
},
"totalPrice": {
{
"idvalue": "54"1.0,
"index": "54",
"namecurrency": "MARACUJAR$",
"externalCode": "58" },
"unitproductionPoint": "UNAdicional Composicao A",
"quantity": 1.0, }
]
},
{
"specialInstructionsid": "Teste4",
"unitPriceindex": {"4",
"valuename": 61.00"AERADO",
"currencyexternalCode": "R$"
}2",
"optionsPriceunit": {"UN",
"valuequantity": 0.01,
"currencyspecialInstructions": "R$Teste",
},
"totalPrice"unitPrice": {
"value": 6132.0099,
"currency": "R$"
}
},
],
"otherFeesoptionsPrice": [],{
"total": {
"itemsvalue": 6137.099,
"otherFeescurrency": 0"R$"
},
"discounttotalPrice": 0.0,{
"orderAmountvalue": 6132.099,
"additionalFeescurrency": 0,"R$"
"deliveryFee": 0
},
"paymentsoptions": {[
"prepaid": 0.0,{
"pending": 0.0,
"methodsindex": ["5",
{
"valueid": 61.0"5",
"currencyname": "BRLAVELA",
"typeexternalCode": "PREPAID4",
"methodunit": "creditUN",
"methodInfoquantity": "Visa"1,
"changeForunitPrice": 0.0
}{
]
},
"deliveryvalue": null37.99,
"extraInfocurrency": "TesteR$",
"schedule": null},
"indoor": null,
"takeout": null,
"tableoriginalPrice": {
"waiterCodevalue": "9999"37.99,
"tableNumbercurrency": "54RS",
"chairNumber": "1"
},
"cardtotalPrice": null
}
} |
Bloco de código |
---|
title | JSON Resposta |
---|
linenumbers | true |
---|
|
{
"errors": [
{
{
"value": 37.99,
"keycurrency": "merchantR$",
"message" },
"productionPoint": "body.data.merchant is requiredAdicional Avela"
}
]
} |
...
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/getStatuS |
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",
"orderKeyType": "TABLE",
"orderKey": ["5"] }
],
"otherFees": [],
"discounts": [],
"total": {
"items": 102.89,
"otherFees": 38.99,
"discount": 0.00,
"orderAmount": 141.88,
"additionalFees": 0,
"deliveryFee": 0
},
"payments": null,
"delivery": null,
"extraInfo": "Teste",
"schedule": null,
"indoor": null,
"takeout": null,
"table": {
"waiterCode": "141.88",
"tableNumber": "8",
"chairNumber": "1"
},
"card": null
}
} |
Bloco de código |
---|
title | JSON Response Resposta |
---|
linenumbers | true |
---|
|
{
"errors": [
{
"key": "integrationHubServiceIddisplayId",
"message": "Provider Merchant for integrationHubServiceId \"f1b874af-96ab-4535-aac3-25118fe586cc\" not found or disabled"
}
]
} |
Nota |
---|
title | Nota: HTTP Status Code = 404 - Not Found |
---|
|
IntegrationHubId incorreto ou inválido |
...
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-40841e9a6812a",
"data": {
"id": "29261444-5ff8-40b2-bce1-42848247d4a2",
"type |
...
O código de status HTTP 412, conhecido como "Precondition Failed" (Pré-condição Falhou), indica que o servidor não atendeu a uma das pré-condições que o cliente colocou no cabeçalho da requisição.
Bloco de código |
---|
title | JSON |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceId": "8f7949c3-cdd6-4db0-8746-369e651026b4",
"orderKeyType": "TABLE",
"orderKeydisplayId": []
} |
Bloco de código |
---|
title | HTTP Status Code 412 = Precpndition Failed |
---|
linenumbers | true |
---|
|
{
"message": "NOT_FOUND"8",
"createdAt": "2024-06-24T17:35:00",
"codeorderTiming": 412
} |
Nota |
---|
title | Nota: HTTP Status Code = 412 Precondition Failed |
---|
|
Alguma regra necessária para a execução da solicitação não foi atendida. É necessário analisar o conteúdo da resposta retornada para identificar os motivos. |
...
O código de status HTTP 429, conhecido como "Too Many Requests" (Muitas Requisições), indica que o cliente excedeu o limite de requisições permitido para um determinado período de tempo. Esse limite é definido pelo servidor e pode variar de acordo com a política de limitação de taxa implementada.
Bloco de código |
---|
title | JSON da requisição |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceId": "7d7d205b-83ba-47c5-91ba-e4f32a2bbd9e",
"orderKeyType": "TABLE",
"orderKey": ["5"]
} |
Bloco de código |
---|
title | Resposta da última execução |
---|
linenumbers | true |
---|
|
{
"success": true,
"error": null,
"integrationHubServiceId": "7d7d205b-83ba-47c5-91ba-e4f32a2bbd9e",
"orderKeyType": "TABLE",
"orderKey": [
"5"
],
"lastestUpdatedStatus": "2024-07-02 18:54:28",
"items": [
{
"id": "de9fd388-c223-4325-a64d-08889250f839",
"status"2024-06-24T17:40:24",
"preparationStartDateTime": "2024-06-24T18:00:00",
"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": {
"codevalue": 50469.90,
"descriptioncurrency": "OPEN_TABLER$"
},
"options": [
{
"index": "3",
"deliveryAgentid": null"3",
"deliveryDateTimename": null"COMPOSICAO A",
"cancellationReasonexternalCode": null"201",
"tableCardNumber": "5"
}
]
}unit": "UN",
"quantity": 1,
"unitPrice": {
"value": 1.00,
"currency": "R$"
},
"originalPrice": {
"value": 1.00,
"currency": "RS"
},
"totalPrice": {
"value": 1.0,
"currency": "R$"
},
"productionPoint": "Adicional Composicao A"
}
]
},
{
"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$"
},
"options": [
{
"index": "5",
"id": "5",
"name": "AVELA",
"externalCode": "4",
"unit": "UN",
"quantity": 1,
"unitPrice": {
"value": 37.99,
"currency": "R$"
},
"originalPrice": {
"value": 37.99,
"currency": "RS"
},
"totalPrice": {
"value": 37.99,
"currency": "R$"
},
"productionPoint": "Adicional Avela"
}
]
}
],
"otherFees": [],
"discounts": [],
"total": {
"items": 102.89,
"otherFees": 38.99,
"discount": 0.00,
"orderAmount": 141.88,
"additionalFees": 0,
"deliveryFee": 0
},
"payments": null,
"delivery": null,
"extraInfo": "Teste",
"schedule": null,
"indoor": null,
"takeout": null,
"table": {
"waiterCode": "141.88",
"tableNumber": "8",
"chairNumber": "1"
},
"card": null
}
} |
Bloco de código |
---|
title | JSON Resposta |
---|
linenumbers | true |
---|
|
{
"errors": [
{
"key": "merchant",
"message": "body.data.merchant is required"
}
]
} |
...
- 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-25118fe586c",
"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$"
},
"options": [
{
"index": "3",
"id": "3",
"name": "COMPOSICAO A",
"externalCode": "201",
"unit": "UN",
"quantity": 1,
"unitPrice": {
"value": 1.00,
"currency": "R$"
},
"originalPrice": {
"value": 1.00,
"currency": "RS"
},
"totalPrice": {
"value": 1.0,
"currency": "R$"
},
"productionPoint": "Adicional Composicao A"
}
]
},
{
"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$"
},
"options": [
{
"index": "5",
"id": "5",
"name": "AVELA",
"externalCode": "4",
"unit": "UN",
"quantity": 1,
"unitPrice": {
"value": 37.99,
"currency": "R$"
},
"originalPrice": {
"value": 37.99,
"currency": "RS"
},
"totalPrice": {
"value": 37.99,
"currency": "R$"
},
"productionPoint": "Adicional Avela"
}
]
}
],
"otherFees": [],
"discounts": [],
"total": {
"items": 102.89,
"otherFees": 38.99,
"discount": 0.00,
"orderAmount": 141.88,
"additionalFees": 0,
"deliveryFee": 0
},
"payments": null,
"delivery": null,
"extraInfo": "Teste",
"schedule": null,
"indoor": null,
"takeout": null,
"table": {
"waiterCode": "141.88",
"tableNumber": "8",
"chairNumber": "1"
},
"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"
}
]
} |
Nota |
---|
title | Nota: HTTP Status Code = 404 - Not Found |
---|
|
IntegrationHubId incorreto ou inválido |
Dica |
---|
|
Para obter detalhes técnicos sobre o envio de requisições ao endpoint newOrder , incluindo a estrutura do corpo da requisição para vários itens 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 vários 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 um de valor integral e outro com valor fracionando, adicionais e desconto acesse a documentação clicando aqui |
Nota |
---|
title | Nota: HTTP Status Code = 429 - Too Many Requests |
---|
|
Alguma regra para atender ao seu pedido não foi cumprida; analise o corpo da resposta para descobrir as razões. |
...
05. LINKS