Páginas filhas
  • New Order Mesa - Vários Itens com Valor Integral e Adicionais

Versões comparadas

Chave

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

CONTEÚDO - NÃO MEXE API


01. VISÃO GERAL
Âncora
ver_geral
ver_geral

Este endpoint é utilizado Esta documentação tem como finalidade demonstrar o formato JSON para envio de requisições de requisição para novos pedidos pedidos com vários itens, com um valor integral e adicionais na API Order mesa via barramentMesa, utilizando o endpoint newOrder.


...

02. ENDPOINT
Âncora
endpoint
endpoint


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


...

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

01. Corpo da requisição para envio de vários itens no mesmo pedido:

Bloco de código
titleJSON da requisição do vários itens no pedido
linenumberstrue
{
	"integrationHubServiceId": "ab8aa1e73fea8768-cfe2bbd9-4fdf454b-80999e7b-af7da88274ba40841e9a6812",
	"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,
			"prepaiddelivery": 0.0null,
			"pendingextraInfo": 0.0"Teste",
			"methodsschedule": [null,
				{
					"value"indoor":  141.88,null,
					"currencytakeout": "BRL"null,
					"typetable": "PREPAID",
		{
			"methodwaiterCode": "credit8",
					"methodInfotableNumber": "Visa8",
					"changeForchairNumber": 0.0
				}
			]"1"
		},
		"deliverycard": null,
		"extraInfo": "Teste",
		"schedule": null,
		"indoor": null,
		"takeout": null,
		"table": {
			"waiterCode": "141.88",
			"tableNumber": "8",
			"chairNumber": "1"
		},
		"card": null
	}
}}
}
Nota
titleNota: HTTP Status
Nota
titleNota: HTTP Status Code = 200 OK

Sua solicitação foi aceita mas ainda não processada, aguarde alguns instantes e procure o status.


...

04. ERROS
Âncora
erros
erros

A seguir, alguns dos erros comuns que podem ser apresentados ao lidar com requisições HTTP e suas respectivas respostas:

...

Bloco de código
titleJSON Inválido
linenumberstrue
{
	"integrationHubServiceId": "ab8aa1e73fea8768-cfe2bbd9-4fdf454b-80999e7b-af7da88274ba40841e9a6812",
	"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",{
				"quantityid": 1"4",
				"specialInstructionsindex": "Teste4",
				"unitPricename": {
					"value": 32.99"AERADO",
					"currencyexternalCode": "R$"
				}2",
				"optionsPriceunit": {"UN",
					"valuequantity": 37.991,
					"currencyspecialInstructions": "R$"
				}Teste",
				"totalPriceunitPrice": {
					"value": 32.99,
					"currency": "R$"
				},
				"optionsoptionsPrice": [
					{
						"indexvalue": "5"37.99,
						"idcurrency": "5R$",
				},
				"nametotalPrice": "AVELA",{
						"externalCodevalue": "4"32.99,
						"unitcurrency": "UNR$",
				},
				"quantityoptions": 1,[
						"unitPrice": {
							"valueindex": 37.99"5",
							"currencyid": "R$"
						}5",
						"originalPricename": {"AVELA",
							"valueexternalCode": 37.99"4",
							"currencyunit": "RSUN",
						}"quantity": 1,
						"totalPriceunitPrice": {
							"value": 37.99,
							"currency": "R$"
						},
						"productionPointoriginalPrice": "Adicional Avela"{
					}
				]"value": 37.99,
			}
		],
		"otherFeescurrency": [],"RS"
		"discounts": []				},
		"total": {
				"itemstotalPrice": 102.89,
{
							"otherFeesvalue": 3837.99,
							"discountcurrency": 0.00"R$"
						},
						"orderAmountproductionPoint": 141.88,
"Adicional Avela"
					"additionalFees": 0,}
			"deliveryFee": 0	]
			},
		"payments": {],
			"prepaidotherFees": 0.0[],
			"pendingdiscounts": 0.0[],
			"methodstotal": [
				{
					"valueitems":  141102.8889,
					"currencyotherFees": "BRL"38.99,
					"typediscount": "PREPAID"0.00,
					"methodorderAmount": "credit"141.88,
					"methodInfoadditionalFees": "Visa"0,
					"changeFordeliveryFee": 0.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
titleJSON Inválido
linenumberstrue
{
	"integrationHubServiceId": "ab8aa1e73fea8768-cfe2bbd9-4fdf454b-80999e7b-af7da88274ba40841e9a6812a",
	"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$"
				}",
				"optionsPriceunit": {"UN",
					"valuequantity": 37.991,
					"currencyspecialInstructions": "R$"
				}Teste",
				"totalPriceunitPrice": {
					"value": 32.99,
					"currency": "R$"
				},
				"optionsoptionsPrice": [
					{
						"indexvalue": "5"37.99,
						"idcurrency": "5R$",
				},
				"nametotalPrice": "AVELA",{
						"externalCodevalue": "4"32.99,
						"unitcurrency": "UNR$",
				},
				"quantityoptions": 1,[
						"unitPrice": {
							"valueindex": 37.99"5",
							"currencyid": "R$"
						}5",
						"originalPricename": {"AVELA",
							"valueexternalCode": 37.99"4",
							"currencyunit": "RSUN",
						}"quantity": 1,
						"totalPriceunitPrice": {
							"value": 37.99,
							"currency": "R$"
						},
						"productionPointoriginalPrice": "Adicional Avela"{
					}
				]"value": 37.99,
			}
		],
		"otherFeescurrency": [],
		"discounts": [],
		"total"RS"
						},
						"totalPrice": {
							"itemsvalue": 10237.8999,
							"otherFeescurrency": 38.99,
"R$"
						"discount": 0.00},
						"orderAmountproductionPoint": 141.88,
"Adicional Avela"
				"additionalFees": 0,	}
			"deliveryFee": 0	]
			},
		"payments": {],
			"prepaidotherFees": 0.0[],
			"pendingdiscounts": 0.0[],
			"methodstotal": [
				{
					"valueitems":  141102.8889,
					"currencyotherFees": "BRL"38.99,
					"typediscount": "PREPAID"0.00,
					"methodorderAmount": "credit"141.88,
					"methodInfoadditionalFees": "Visa"0,
					"changeFordeliveryFee": 0.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
titleIntegration Hub Code Inválido
linenumberstrue
{
	"integrationHubServiceId": "709aa0b2f1b874af-2b8996ab-4d064535-9f12aac3-c3b8c275d9fa25118fe586c",
	"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",
						"externalCodeindex": "45",
						"unitid": "UN5",
						"quantityname": 1"AVELA",
						"unitPriceexternalCode": {"4",
							"valueunit": 37.99"UN",
							"currencyquantity": "R$"
						}1,
						"originalPriceunitPrice": {
							"value": 37.99,
							"currency": "RSR$"
						},
						"totalPriceoriginalPrice": {
							"value": 37.99,
							"currency": "R$"
						},
						"productionPoint": "Adicional Avela"
					}RS"
				]
			},
		],
				"otherFeestotalPrice": [],{
		"discounts": [],
		"total": {
			"itemsvalue": 10237.8999,
							"otherFeescurrency": 38.99,
"R$"
					"discount": 0.00	},
						"orderAmountproductionPoint": 141.88,
"Adicional Avela"
					"additionalFees": 0,
}
				"deliveryFee": 0
]
			},
		"payments": {],
			"prepaidotherFees": 0.0[],
			"pendingdiscounts": 0.0[],
			"methodstotal": [
				{
					"valueitems":  141102.8889,
					"currencyotherFees": "BRL"38.99,
					"typediscount": "PREPAID"0.00,
					"methodorderAmount": "credit"141.88,
					"methodInfoadditionalFees": "Visa"0,
					"changeFordeliveryFee": 0.0
				},
			]
		}"payments": null,
		"delivery": null,
		"extraInfo": "Teste",
		"schedule": null,
		"indoor": null,
		"takeout": null,
		"table": {
			"waiterCode": "141.88",
			"tableNumber": "8",
			"chairNumber": "1"
		},
		"card": null
	}
}

...

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 vários itens  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 varios vários itens com valor integral, adicionais e descontos  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 um de valor integral e outro com valor fracionando, adicionais e descontos desconto  acesse a documentação clicando aqui.


...




Templatedocumentos