Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Este endpoint é utilizado para envio de requisição para novos pedidos na API Order  mesa via barramentbarramento, para envio de um pedido com vários itens com valor integral.


...

02. ENDPOINT
Âncora
endpoint
endpoint


MétodoURL
POSThttps://api-barramento.meuelevestage.com/order/newOrder


...

03. EXEMPLO DE UTILIZAÇÃO
Âncora
varios_itens
varios_itens

...

Bloco de código
titleJSON da requisição do vários itens no pedido
linenumberstrue
{
	"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$"
				}
			},
			{
				"id": "174",
				"index": "174",
				"name": "MARACUJAAERADO",
				"externalCode": "582",
				"unit": "UN",
				"quantity": 1,
				"specialInstructions": "Teste",
				"unitPrice": {
					"value": 6132.0099,
					"currency": "R$"
				},
				"optionsPrice": {
					"value": 037.0099,
					"currency": "R$"
				},
				"totalPrice": {
					"value": 6132.0099,
					"currency": "R$"
				}
			}
		],
		 "otherFees": [],
		 "discounts": [],
		"total": {
			"items": 130102.9089,
			"otherFees": 038.0099,
			"discount": 0.00,
			"orderAmount": 130141.9088,
			"additionalFees": 0,
			"deliveryFee": 0
		},
		"payments": {
			"prepaid": 0.0,
			"pending": 0.0,
			"methods": [
				{
					"value":  130141.9088,
					"currency": "BRL",
					"type": "PREPAID",
					"method": "credit",
					"methodInfo": "Visa",
					"changeFor": 0.0
				}
			]
		},
		"delivery": null,
		"extraInfo": "Teste",
		"schedule": null,
		"indoor": null,
		"takeout": null,
		"table": {
			"waiterCode": "9999141.88",
			"tableNumber": "3008",
			"chairNumber": "1"
		},
		"card": null
	}
}

...

Bloco de código
titleJSON Inválido
linenumberstrue
{
	"integrationHubServiceId": "3fea8768ab8aa1e7-bbd9cfe2-454b4fdf-9e7b8099-40841e9a6812af7da88274ba",
	"data": {
		"id": "b1e26dd829261444-0a1b5ff8-486e40b2-bf62bce1-65e80ddce2f442848247d4a2",
		"type": "TABLE",
		"displayId": 558,
		"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": "542",
				"index": "542",
				"name": "MARACUJAA FRANCESA",
				"externalCode": "581",
				"unit": "UN",
				"quantity": 1.0,
				"specialInstructions": "Teste",
				"unitPrice": {
					"value": 6169.0090,
					"currency": "R$"
				},
				"optionsPrice": {
					"value": 01.000,
					"currency": "R$"
				},
				"totalPrice": {
					"value": 6169.0090,
					"currency": "R$"
				}
			},
		],
	{
				"otherFeesid": []"4",
				"totalindex": {"4",
				"itemsname": 61.0"AERADO",
				"otherFeesexternalCode": 0"2",
				"discountunit": 0.0"UN",
				"orderAmountquantity": 61.01,
				"additionalFeesspecialInstructions": 0"Teste",
				"deliveryFeeunitPrice": 0{
			},
		"paymentsvalue": {
32.99,
					"prepaidcurrency": 0.0,"R$"
			"pending": 0.0	},
				"methodsoptionsPrice": [
				{
					"value": 6137.099,
					"currency": "BRL"R$"
				},
					"typetotalPrice": "PREPAID",{
					"methodvalue": "credit"32.99,
					"methodInfocurrency": "VisaR$",
					"changeFor": 0.0}
				}
			]
		},
		"deliveryotherFees": null[],
		"extraInfodiscounts": "Teste"[],
		"scheduletotal": null,{
			"indooritems": null102.89,
			"takeoutotherFees": null38.99,
			"tablediscount": {0.00,
			"waiterCodeorderAmount": "9999"141.88,
			"tableNumberadditionalFees": "54",0,
			"chairNumberdeliveryFee": "1"0
		},
		"cardpayments": null{
	}
}
Bloco de código
titleJSON Resposta
linenumberstrue
{
	"errors		"prepaid": 0.0,
			"pending": 0.0,
			"methods": [
				{
					"keyvalue": "displayId" 141.88,
			"message		"currency": "body.data.displayId must be a string"BRL",
		}
	]
}

02. JSON enviando faltando um ou mais campos.

Bloco de código
titleJSON Inválido
linenumberstrue
{
	"integrationHubServiceId			"type": "299f76ba-3ac3-4cc1-abaf-fac5a2510d8cPREPAID",
					"datamethod": {"credit",
					"idmethodInfo": "fa3a2d45-3a29-4136-95e7-692d93db8b2bVisa",
					"typechangeFor": "TABLE"0.0
				}
			]
		},
		"displayIddelivery": "55"null,
		"createdAtextraInfo": "2024-06-24T17:35:00Teste",
		"orderTimingschedule": "2024-06-24T17:40:24",null,
		"preparationStartDateTimeindoor": "2024-06-24T18:00:00",		null,
		"itemstakeout": [null,
			{
				"id"table": "54",{
				"indexwaiterCode": "54141.88",
				"nametableNumber": "MARACUJA8",
				"externalCodechairNumber": "581",
		},
		"unitcard": "UN",
				"quantity": 1.0,
	null
	}
}
Bloco de código
titleJSON Resposta
linenumberstrue
{
	"errors": [
		{
			"specialInstructionskey": "TestedisplayId",
				"unitPricemessage": {
					"value": 61.00,"body.data.displayId must be a string"
		}
	]
}


...

02. JSON enviando faltando um ou mais campos.

Bloco de código
titleJSON Inválido
linenumberstrue
{
	"integrationHubServiceId			"currency": "R$"
				},
				"optionsPriceab8aa1e7-cfe2-4fdf-8099-af7da88274ba",
	"data": {
					"valueid": 0.0,
					"currency"29261444-5ff8-40b2-bce1-42848247d4a2",
		"type": "R$"
				}TABLE",
				"totalPricedisplayId": {"8",
					"valuecreatedAt": 61.00,
			"2024-06-24T17:35:00",
		"currencyorderTiming": "R$"
				}
			}
		]2024-06-24T17:40:24",
		"preparationStartDateTime": "2024-06-24T18:00:00",
		"otherFeesitems": [],
			"total": {
				"itemsid": 61.0"2",
				"otherFeesindex": 0"2",
				"discountname": 0.0"A FRANCESA",
				"orderAmountexternalCode": 61.0,"1",
				"additionalFeesunit": 0"UN",
				"deliveryFeequantity": 01,
		},
		"paymentsspecialInstructions": {"Teste",
				"prepaidunitPrice": 0.0,{
					"pendingvalue": 069.090,
					"methodscurrency": ["R$"
				},
				"optionsPrice": {
					"value": 611.000,
					"currency": "BRL"R$"
				},
					"typetotalPrice": "PREPAID",{
					"methodvalue": "credit"69.90,
					"methodInfocurrency": "VisaR$",
					"changeFor": 0.0}
				},
			]{
		},
		"deliveryid": null"4",
				"extraInfoindex": "Teste4",
				"schedulename": null"AERADO",
				"indoorexternalCode": null"2",
				"takeoutunit": null"UN",
				"tablequantity": {1,
				"waiterCodespecialInstructions": "9999Teste",
				"tableNumberunitPrice": "54"{
					"value": 32.99,
					"chairNumbercurrency": "1R$"
				},
				"cardoptionsPrice": null{
	}
}
Bloco de código
titleJSON Resposta
linenumberstrue
{
	"errors": [
		{
				"value": 37.99,
					"currency": "R$"
				},
				"keytotalPrice": "merchant",
{
					"value": 32.99,
					"messagecurrency": "body.data.merchant is requiredR$"
				}				
		]
}

...

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
titleNota: 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.

...

	}
		],
		"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
titleJSON Resposta
linenumberstrue
{
	"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
titleNota: 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
titleURL enviada incorreda
https://api-barramento.meuelevestage.com/order/newOrderS
Bloco de código
titleJSON Response para URL incorreta
linenumberstrue
{
	"message": "Missing Authentication Token"
}
Nota
titleNota: 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
titleIntegration Hub Code Inválido
linenumberstrue
{
	"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$"
				}
			},
			{
				"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$"
				}
			}
		],
		"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
titleJSON Response
linenumberstrue
{
	"errors": [
		{
			"key": "integrationHubServiceId",
			"message": "Provider Merchant for integrationHubServiceId \"709aa0b2-2b89-4d06-9f12-c3b8c275d9fa\" not found or disabled"
		}
	]
}
Nota
titleNota: HTTP Status Code = 404 - Not Found

IntegrationHubId incorreto ou inválido

Dica
titleSaiba mais!

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
titleSaiba mais!

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

...

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
titleURL enviada incorreda
https://api-barramento.meuelevestage.com/order/getStatuS
Bloco de código
titleJSON Response para URL incorreta
linenumberstrue
{
	"message": "Missing Authentication Token"
}
Nota
titleNota: 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
titleIntegration Hub Code Inválido
linenumberstrue
{
    "integrationHubServiceId": "f1b874af-96ab-4535-aac3-25118fe586cc",
	  "orderKeyType": "TABLE",
	  "orderKey": ["5"]
}
Bloco de código
titleJSON Response
linenumberstrue
{
	"errors": [
		{
			"key": "integrationHubServiceId",
			"message": "Provider Merchant for integrationHubServiceId \"f1b874af-96ab-4535-aac3-25118fe586cc\" not found or disabled"
		}
	]
}
Nota
titleNota: HTTP Status Code = 404 - Not Found

IntegrationHubId incorreto ou inválido

...

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
titleJSON
linenumberstrue
{
    "integrationHubServiceId": "8f7949c3-cdd6-4db0-8746-369e651026b4",
	  "orderKeyType": "TABLE",
	  "orderKey": []
}
Bloco de código
titleHTTP Status Code 412 = Precpndition Failed
linenumberstrue
{
	"message": "NOT_FOUND",
	"code": 412
}
Nota
titleNota: 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
titleJSON da requisição
linenumberstrue
{
    "integrationHubServiceId": "7d7d205b-83ba-47c5-91ba-e4f32a2bbd9e",
	  "orderKeyType": "TABLE",
		"orderKey": ["5"]
}
Bloco de código
titleResposta da última execução
linenumberstrue
{
	"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": {
				"code": 504,
				"description": "OPEN_TABLE"
			},
			"deliveryAgent": null,
			"deliveryDateTime": null,
			"cancellationReason": null,
			"tableCardNumber": "5"
		}
	]
}
Nota
titleNota: 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.


...




Templatedocumentos