Versões comparadas

Chave

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

...

Esta documentação tem como finalidade demonstrar o formato JSON para envio de requisições de pedidos com vários itens na API Order MesaCartão Consumo, utilizando o endpoint newOrder.

...

Bloco de código
titleJSON da requisição do vários itens no pedido
linenumberstrue
{
	"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812",
	"data": {
		"id": "29261444-5ff8-40b2-bce1-42848247d4a2",
		"type": "TABLECARD",
		"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": {null,
			"prepaiddelivery": 0.0null,
			"pendingextraInfo": 0.0"Teste",
			"methodsschedule": [
				{null,
					"valueindoor":  141.88null,
					"currencytakeout": "BRL"null,
					"typetable": "PREPAID"null,
					"methodcard": "credit",{
					"methodInfowaiterCode": "Visa"9999,
					"changeForcardNumber": 0.0
				}
			]
		}29,
		"delivery": null,
		"extraInfodeliveryTableNumber": "Teste",29
		"schedule": null,
		"indoor": null,
		"takeout": null,
		"table": {
			"waiterCode": "141.88",
			"tableNumber": "8",
			"chairNumber": "1"
		},
		"card": null
	}
}} 
	}
}
Nota
titleNota: HTTP Status Code = 200 OK

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

...

Bloco de código
titleJSON Inválido
linenumberstrue
{
	"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812a40841e9a6812",
	"data": {
		"id": "29261444-5ff8-40b2-bce1-42848247d4a2",
		"type": "TABLECARD",
		"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": [
			{
		,
		"idmerchant": "2",{
				"indexid": "2c312d2ff-1a8f-40ad-8eed-9ae9a908df6e",
				"name": "ABOTECO DO FRANCESAALBINO",
				"externalCode": "1"},
				"unititems": "UN",[
				"quantity": 1,{
				"specialInstructionsid": "Teste2",
				"unitPriceindex": {"2",
					"valuename": 69.90"A FRANCESA",
					"currencyexternalCode": "R$"
				}1",
				"optionsPriceunit": {"UN",
					"valuequantity": 1.00,
					"currencyspecialInstructions": "R$"
				}Teste",
				"totalPriceunitPrice": {
					"value": 69.90,
					"currency": "R$"
				}
			},
			{
				"id": "4",
				"indexoptionsPrice": "4",{
					"namevalue": "AERADO"1.00,
					"externalCodecurrency": "2"R$"
				},
				"unittotalPrice": "UN",{
					"quantityvalue": 169.90,
					"specialInstructionscurrency": "Teste"R$"
				}
			},
			{
				"unitPriceid": {"4",
					"valueindex": 32.99"4",
					"currencyname": "R$AERADO",
				}"externalCode": "2",
				"optionsPriceunit": {"UN",
					"valuequantity": 37.991,
					"currencyspecialInstructions": "R$"
				}Teste",
				"totalPriceunitPrice": {
					"value": 32.99,
					"currency": "R$"
				}
			}
		],
		"otherFees": [],
		"discounts": [],
		"totaloptionsPrice": {
					"itemsvalue": 10237.8999,
					"otherFeescurrency": 38.99"R$"
				},
				"discounttotalPrice": 0.00,
{
					"orderAmountvalue": 14132.8899,
					"additionalFeescurrency": 0,"R$"
				"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": null,
		"card": {
			"waiterCode": "141.88"9999,
			"tableNumbercardNumber": "8"29,
			"chairNumberdeliveryTableNumber": "1"29
		},
		"card": null 
	}
}
Bloco de código
titleJSON Resposta
linenumberstrue
{
	"errors": [
		{
			"key": "displayId",
			"message": "body.data.displayId must be a string"
		}
	]
}

...

Bloco de código
titleJSON Inválido
linenumberstruetrue
{
	"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812",
	"data": {
		"id": "29261444-5ff8-40b2-bce1-42848247d4a2",
		"type": "CARD",
		"displayId": "8",
		"createdAt": "2024-06-24T17:35:00",
		"orderTiming": "2024-06-24T17:40:24",
		"preparationStartDateTime": "2024-06-24T18:00:00",
		"items": [
			{
				"id": "2{
	"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",
		"items": [
			{
				"id": "2",
				"index": "2",
				"name": "A FRANCESA",
				"externalCode": "1",
				"unit": "UN",
				"quantity": 1,
				"specialInstructions": "Teste",
				"unitPriceindex": {"2",
					"valuename": 69.90"A FRANCESA",
					"currencyexternalCode": "R$"
				}1",
				"optionsPriceunit": {"UN",
					"valuequantity": 1.00,
					"currencyspecialInstructions": "R$"
				}Teste",
				"totalPriceunitPrice": {
					"value": 69.90,
					"currency": "R$"
				},
			},
				"optionsPrice": {
					"idvalue": "4"1.00,
					"indexcurrency": "4"R$"
				},
				"nametotalPrice": "AERADO",{
					"externalCodevalue": "2"69.90,
					"unitcurrency": "UNR$",
				}
			"quantity": 1},
			{
				"specialInstructionsid": "Teste4",
				"unitPriceindex": {"4",
					"valuename": 32.99"AERADO",
					"currencyexternalCode": "R$"
				}2",
				"optionsPriceunit": {"UN",
					"valuequantity": 37.991,
					"currencyspecialInstructions": "R$"
				}Teste",
				"totalPriceunitPrice": {
					"value": 32.99,
					"currency": "R$"
				}				
			}
		],
		"otherFees": [],
		"discounts": [],
		"totaloptionsPrice": {
					"itemsvalue": 10237.8999,
					"otherFeescurrency": 38.99"R$"
				},
				"discounttotalPrice": 0.00,
{
					"orderAmountvalue": 14132.8899,
					"additionalFeescurrency": 0,"R$"
				"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": null,
		"card": {
			"waiterCode": "141.88"9999,
			"tableNumbercardNumber": "8"29,
			"chairNumberdeliveryTableNumber": "1"29
		},
		"card": null 
	}
}
Bloco de código
titleJSON Resposta
linenumberstrue
{
	"errors": [
		{
			"key": "merchant",
			"message": "body.data.merchant is required"
		}
	]
}

...

Bloco de código
titleIntegration Hub Code Inválido
linenumberstrue
{
	"integrationHubServiceId": "709aa0b2-2b89-4d06-9f12-c3b8c275d9fa",
	"data": {
		"id": "29261444-5ff8-40b2-bce1-42848247d4a2",
		"type": "TABLECARD",
		"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": [
			{
		,
		"idmerchant": "2",{
				"indexid": "2c312d2ff-1a8f-40ad-8eed-9ae9a908df6e",
				"name": "ABOTECO DO FRANCESAALBINO",
				"externalCode": "1"},
				"unititems": "UN",[
				"quantity": 1,{
				"specialInstructionsid": "Teste2",
				"unitPriceindex": {"2",
					"valuename": 69.90"A FRANCESA",
					"currencyexternalCode": "R$"
				}1",
				"optionsPriceunit": {"UN",
					"valuequantity": 1.00,
					"currencyspecialInstructions": "R$"
				}Teste",
				"totalPriceunitPrice": {
					"value": 69.90,
					"currency": "R$"
				}
			},
			{
				"id": "4",
				"indexoptionsPrice": "4",{
					"namevalue": "AERADO"1.00,
					"externalCodecurrency": "2"R$"
				},
				"unittotalPrice": "UN",{
					"quantityvalue": 169.90,
					"specialInstructionscurrency": "Teste"R$"
				}
			},
			{
				"unitPriceid": {"4",
					"valueindex": 32.99"4",
					"currencyname": "R$AERADO",
				}"externalCode": "2",
				"optionsPriceunit": {"UN",
					"valuequantity": 37.991,
					"currencyspecialInstructions": "R$"
				}Teste",
				"totalPriceunitPrice": {
					"value": 32.99,
					"currency": "R$"
				}
			}
		],
		"otherFees": [],
		"discounts": [],
		"totaloptionsPrice": {
					"itemsvalue": 10237.8999,
					"otherFeescurrency": 38.99"R$"
				},
				"discounttotalPrice": 0.00,
{
					"orderAmountvalue": 14132.8899,
					"additionalFeescurrency": 0,"R$"
				"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": null,
		"card": {
			"waiterCode": "141.88"9999,
			"tableNumbercardNumber": "8"29,
			"chairNumberdeliveryTableNumber": "1"29
		},
		"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"
		}
	]
}

...

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.


...


New Order Mesa - Itens Fracionando
New Order Cartão- Vários Itens



Templatedocumentos