...
Bloco de código |
---|
title | JSON da requisição do vários itens no pedido |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceId": "82b90dffab8aa1e7-6d68cfe2-4fd14fdf-8c598099-5f6623d2d45faf7da88274ba",
"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,
"specialInstructionsunitPrice": "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": {
"items": 130.90}
]
},
"otherFees{
"id": 0.00"4",
"discountindex": 0.00"4",
"orderAmountname": 130.90"AERADO",
"additionalFeesexternalCode": 0"2",
"deliveryFeeunit": 0"UN",
},
"paymentsquantity": {1,
"prepaidspecialInstructions": 0.0,
"pending": 0.0"Teste",
"methodsunitPrice": [
{
"value": 13032.9099,
"currency": "BRLR$",
"type": "PREPAID"},
"methodoptionsPrice": "credit",{
"methodInfovalue": "Visa"37.99,
"changeForcurrency": 0.0"R$"
},
]
},
"delivery"totalPrice": null,{
"extraInfovalue": "Teste"32.99,
"schedulecurrency": null,
"indoor": null"R$"
},
"takeoutoptions": null,[
"table": {
"waiterCodeindex": "99995",
"tableNumberid": "3005",
"chairNumbername": "1AVELA",
},
"cardexternalCode": 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"
},
"items": [
{
"id": "54",
"index": "54",
"name": "MARACUJA",
"externalCode": "58",
"unit": "UN",
"quantity": 1.0,
"specialInstructions": "Teste",
"unitPrice": {
"value": 61.00,
"currency": "R$"
},
"optionsPrice": "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": {
"prepaid": 0.0,
"pending": 0.0,
"methods": [
{
"value": 0 141.088,
"currency": "R$BRL",
},
"totalPricetype": {"PREPAID",
"valuemethod": 61.00"credit",
"currencymethodInfo": "R$Visa",
} "changeFor": 0.0
}
]
},
"otherFeesdelivery": []null,
"totalextraInfo": {"Teste",
"itemsschedule": 61.0null,
"otherFeesindoor": 0null,
"discounttakeout": 0.0null,
"orderAmounttable": 61.0,{
"additionalFeeswaiterCode": 0"141.88",
"deliveryFeetableNumber": 0"8",
},
"paymentschairNumber": {
"prepaid": 0.0,1"
"pending": 0.0},
"methodscard": [null
{
"value": 61.0,
"currency": "BRL",
"type": "PREPAID",
"method": "credit",
"methodInfo": "Visa",
"changeFor": 0.0
}
]
},
"delivery": null,
"extraInfo": }
} |
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": "ab8aa1e7-cfe2-4fdf-8099-af7da88274ba",
"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"Teste",
"schedule": null,
"indoor": null,
"takeout": null,
"table": {
"waiterCodeid": "9999c312d2ff-1a8f-40ad-8eed-9ae9a908df6e",
"tableNumbername": "54",
"chairNumber": "1BOTECO DO ALBINO"
},
"carditems": null
}
} |
Bloco de código |
---|
title | JSON Resposta |
---|
linenumbers | true |
---|
|
{
"errors": [
[
{
"keyid": "displayId2",
"messageindex": "body.data.displayId must be a string"2",
}
]
} |
02. JSON enviando faltando um ou mais campos.
Bloco de código |
---|
title | JSON Inválido |
---|
linenumbers | true |
---|
|
{
"integrationHubServiceIdname": "299f76ba-3ac3-4cc1-abaf-fac5a2510d8cA FRANCESA",
"dataexternalCode": {"1",
"idunit": "fa3a2d45-3a29-4136-95e7-692d93db8b2bUN",
"typequantity": "TABLE"1,
"displayIdspecialInstructions": "55Teste",
"createdAtunitPrice": "2024-06-24T17:35:00"{
"value": 69.90,
"orderTimingcurrency": "2024-06-24T17:40:24"R$"
},
"preparationStartDateTimeoptionsPrice": "2024-06-24T18:00:00",{
"itemsvalue": [1.00,
{
"idcurrency": "54R$",
"index": "54"},
"nametotalPrice": "MARACUJA",{
"externalCodevalue": "58"69.90,
"unitcurrency": "UNR$",
"quantity": 1.0},
"specialInstructionsoptions": "Teste",[
"unitPrice": {
"valueindex": 61.00"3",
"currencyid": "R$3",
},
"optionsPricename": {"COMPOSICAO A",
"valueexternalCode": 0.0"201",
"currencyunit": "R$UN",
} "quantity": 1,
"totalPriceunitPrice": {
"value": 611.00,
"currency": "R$"
}
},
],
"otherFeesoriginalPrice": [],{
"total": {
"itemsvalue": 611.000,
"otherFeescurrency": 0"RS"
},
"discounttotalPrice": 0.0,{
"orderAmountvalue": 611.0,
"additionalFeescurrency": 0,"R$"
"deliveryFee": 0
},
"paymentsproductionPoint": {
"Adicional Composicao A"
"prepaid": 0.0,}
"pending": 0.0, ]
"methods": [},
{
"valueid": 61.0"4",
"currencyindex": "BRL4",
"typename": "PREPAIDAERADO",
"methodexternalCode": "credit2",
"methodInfounit": "VisaUN",
"changeForquantity": 0.0
}
]
}1,
"delivery": null,
"extraInfospecialInstructions": "Teste",
"scheduleunitPrice": null,{
"indoorvalue": null32.99,
"takeoutcurrency": null"R$"
},
"tableoptionsPrice": {
"waiterCodevalue": "9999"37.99,
"tableNumbercurrency": "54"R$"
},
"chairNumbertotalPrice": "1"{
"value": 32.99,
},
"cardcurrency": null"R$"
}
} |
Bloco de código |
---|
title | JSON Resposta |
---|
linenumbers | true |
---|
|
{
"errors,
"options": [
{
"keyindex": "merchant5",
"messageid": "body.data.merchant is required"
}
]
} |
...
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"]
} |
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 |
...
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": {
"prepaid": 0.0,
"pending": 0.0,
"methods": [
{
"value": 141.88,
"currency": "BRL",
"type": "PREPAID",
"method": "credit",
"methodInfo": "Visa",
"changeFor": 0.0
}
]
},
"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": "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": "ab8aa1e7-cfe2-4fdf-8099-af7da88274ba",
"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",
"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": {
"prepaid": 0.0,
"pending": 0.0,
"methods": [
{
"value": 141.88,
"currency": "BRL",
"type": "PREPAID",
"method": "credit",
"methodInfo": "Visa",
"changeFor": 0.0
}
]
},
"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": "709aa0b2-2b89-4d06-9f12-c3b8c275d9fa",
"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": {
"prepaid": 0.0,
"pending": 0.0,
"methods": [
{
"value": 141.88,
"currency": "BRL",
"type": "PREPAID",
"method": "credit",
"methodInfo": "Visa",
"changeFor": 0.0
}
]
},
"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 |
...
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",
"orderKey": []
} |
Bloco de código |
---|
title | HTTP Status Code 412 = Precpndition Failed |
---|
linenumbers | true |
---|
|
{
"message": "NOT_FOUND",
"code": 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": [
{
"idkey": "de9fd388-c223-4325-a64d-08889250f839integrationHubServiceId",
"statusmessage": {
"code": 504,
"description": "OPEN_TABLE"Provider Merchant for integrationHubServiceId \"f1b874af-96ab-4535-aac3-25118fe586cc\" not found or disabled"
},
"deliveryAgent": null,
"deliveryDateTime": null,
"cancellationReason": null,
"tableCardNumber": "5"
}
]
}]
} |
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 varios 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 |
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