Páginas filhas
  • New Order Cartão - Itens com Valor Integral e Adicionais

Versões comparadas

Chave

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

...

Bloco de código
titleJSON para pedido com inteiro
linenumberstrue
{
	"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812",
	"data": {
		"id": "f4114e16-c2e4-4dc3-86f3-98a52bfd5d7d",
		"type": "CARD",
		"displayId": "58",
		"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": "61",
				"index": "60",
				"name": "A FRANCESA",
				"externalCode": "1",
				"unit": "UN",
				"quantity": 1,
				"specialInstructions": "Teste",
				"unitPrice": {
					"value": 69.90,
					"currency": "R$"
				},
				"optionsPrice": {
					"value": 0.0,
					"currency": "R$"
				},
				"totalPrice": {
					"value": 69.90,
					"currency": "R$"
				},
				"options": [
					{
						"index": "61",
						"id": "61",
						"name": "COMPOSICAO A",
						"externalCode": "201",
						"unit": "UN",
						"quantity": 1,
						"unitPrice": {
							"value": 1.00,
							"currency": "R$"
						},
						"originalPrice": {
							"value": 1.00,
							"currency": "R$"
						},
						"totalPrice": {
							"value": 1.00,
							"currency": "R$"
						},
						"productionPoint": "Teste"
					}
				]
			}
		],
		"otherFees": [],
		"total": {
			"items": 70.90,
			"otherFees": 0,
			"discount": 0.0,
			"orderAmount": 70.90,
			"additionalFees": 0,
			"deliveryFee": 0
		},
		"payments": {null,
			"prepaiddelivery": 0.0null,
			"pendingextraInfo": 0.0"Teste",
			"methodsschedule": [null,
				{
		"indoor": null,
			"valuetakeout": 70.90null,
					"currencytable": "BRL"null,
					"typecard": "PREPAID",{
					"methodwaiterCode": "credit"9999,
					"methodInfocardNumber": "Visa"29,
					"changeFordeliveryTableNumber": 0.029
				} 
			]}
		},
		"delivery": null,
		"extraInfo": "Teste",
		"schedule": null,
		"indoor": null,
		"takeout": null,
		"table": null,
		"card": {
			"waiterCode": 9999,
			"cardNumber": 29,
			"deliveryTableNumber": 29
		} 
	}
}
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. 

...

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

...

}
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:

  • 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
titleJSON Inválido
linenumberstrue
{
	"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812",
	"data

...

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
titleJSON Inválido
linenumberstrue
{
	"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812",
	"data": {
		"id": "f4114e16-c2e4-4dc3-86f3-98a52bfd5d7d",
		"type": "CARD",
		"displayId": 58,
		"createdAt": "2024-06-24T17:35:00",
		"orderTiming": "2024-06-24T17:40:24",
		"preparationStartDateTime": "2024-06-24T18:00:00",
		"merchant": {
			"id": "c312d2fff4114e16-1a8fc2e4-40ad4dc3-8eed86f3-9ae9a908df6e98a52bfd5d7d",
			"nametype": "BOTECO DO ALBINO"
		}CARD",
		"itemsdisplayId": [58,
			{
		"createdAt": "2024-06-24T17:35:00",
		"idorderTiming": "612024-06-24T17:40:24",
				"indexpreparationStartDateTime": "602024-06-24T18:00:00",
		"merchant": {
			"nameid": "A FRANCESAc312d2ff-1a8f-40ad-8eed-9ae9a908df6e",
				"externalCodename": "1BOTECO DO ALBINO",
		},
		"unititems": "UN",[
				"quantity": 1,{
				"specialInstructionsid": "Teste61",
				"unitPriceindex": {"60",
					"valuename": 69.90"A FRANCESA",
					"currencyexternalCode": "R$"
				}1",
				"optionsPriceunit": {"UN",
					"valuequantity": 0.01,
					"currencyspecialInstructions": "R$"
				}Teste",
				"totalPriceunitPrice": {
					"value": 69.90,
					"currency": "R$"
				},
				"optionsoptionsPrice": [
					{
						"indexvalue": "61",
						"id": "61",
						"name": "COMPOSICAO A",
	0.0,
					"externalCodecurrency": "201R$",
				},
				"unittotalPrice": "UN",{
						"quantityvalue": 169.90,
						"unitPricecurrency": {"R$"
				},
				"valueoptions": 1.00,
[
					{
						"currencyindex": "R$61",
						}"id": "61",
						"originalPricename": {
	"COMPOSICAO A",
						"valueexternalCode": 1.00"201",
							"currencyunit": "R$UN",
						}"quantity": 1,
						"totalPriceunitPrice": {
							"value": 1.00,
							"currency": "R$"
						},
						"productionPointoriginalPrice": "Teste"{
					}
				]"value": 1.00,
			}
		],
		"otherFeescurrency": [],"R$"
		"total": {
				"items": 70.90},
						"otherFeestotalPrice": 0,{
							"discountvalue": 01.000,
							"orderAmountcurrency": 70.90,"R$"
			"additionalFees": 0			},
						"deliveryFeeproductionPoint": 0
"Teste"
					},
		"payments": {		]
			"prepaid": 0.0}
		],
			"pendingotherFees": 0.0[],
			"methodstotal": [
				{
					"valueitems": 70.90,
					"currencyotherFees": "BRL"0,
					"typediscount": "PREPAID"0.0,
					"methodorderAmount": "credit"70.90,
					"methodInfoadditionalFees": "Visa"0,
					"changeFordeliveryFee": 0.0
				}
			]},
		}"payments": null,
		"delivery": null,
		"extraInfo": "Teste",
		"schedule": null,
		"indoor": null,
		"takeout": null,
		"table": null,
		"card": {
			"waiterCode": 9999,
			"cardNumber": 29,
			"deliveryTableNumber": 29
		} 
	}
}

...

Bloco de código
titleJSON Inválido
linenumberstrue
{
	"integrationHubServiceId": "3fea8768-bbd9-454b-9e7b-40841e9a6812",
	"data": {
		"id": "f4114e16-c2e4-4dc3-86f3-98a52bfd5d7d",
		"type": "CARD",
		"displayId": "58",
		"createdAt": "2024-06-24T17:35:00",
		"orderTiming": "2024-06-24T17:40:24",
		"preparationStartDateTime": "2024-06-24T18:00:00",
		"items": [
			{
				"id": "61",
				"index": "60",
				"name": "A FRANCESA",
				"externalCode": "1",
				"unit": "UN",
				"quantity": 1,
				"specialInstructions": "Teste",
				"unitPrice": {
					"value": 69.90,
					"currency": "R$"
				},
				"optionsPrice": {
					"value": 0.0,
					"currency": "R$"
				},
				"totalPrice": {
					"value": 69.90,
					"currency": "R$"
				},
				"options": [
					{
						"index": "61",
						"id": "61",
						"name": "COMPOSICAO A",
						"externalCode": "201",
						"unit": "UN",
						"quantity": 1,
						"unitPrice": {
							"valueexternalCode": 1.00"201",
							"currencyunit": "R$UN",
						}"quantity": 1,
						"originalPriceunitPrice": {
							"value": 1.00,
							"currency": "R$"
						},
						"totalPriceoriginalPrice": {
							"value": 1.00,
							"currency": "R$"
						},
						"productionPoint": "Teste"
					}
				]
			}
		],
		"otherFees": [],
		"totaltotalPrice": {
							"itemsvalue": 701.9000,
							"otherFeescurrency": 0,"R$"
			"discount": 0.0			},
			"orderAmount": 70.90,
			"additionalFeesproductionPoint": 0,
"Teste"
					"deliveryFee": 0
}
				},]
		"payments": {	}
			"prepaid": 0.0],
			"pendingotherFees": 0.0[],
			"methodstotal": [
				{
					"valueitems": 70.90,
					"currencyotherFees": "BRL"0,
					"typediscount": "PREPAID"0.0,
					"methodorderAmount": "credit"70.90,
					"methodInfoadditionalFees": "Visa"0,
					"changeFordeliveryFee": 0.0
				},
			]
		}"payments": null,
		"delivery": null,
		"extraInfo": "Teste",
		"schedule": null,
		"indoor": null,
		"takeout": null,
		"table": null,
		"card": {
			"waiterCode": 9999,
			"cardNumber": 29,
			"deliveryTableNumber": 29
		} 
	}
}

...

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
titleIntegration Hub Code Inválido
linenumberstrue
{
	"integrationHubServiceId": "f1b874af-96ab-4535-aac3-25118fe586cc",
	"data": {
		"id": "f4114e16-c2e4-4dc3-86f3-98a52bfd5d7d",
		"type": "CARD",
		"displayId": "58",
		"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": "61",
				"index": "60",
				"name": "A FRANCESA",
				"externalCode": "1",
				"unit": "UN",
				"quantity": 1,
				"specialInstructions": "Teste",
				"unitPrice": {
					"value": 69.90,
					"currency": "R$"
				},
				"optionsPrice": {
					"value": 0.0,
					"currency": "R$"
				},
				"totalPrice": {
					"value": 69.90,
					"currency": "R$"
				},
				"options": [
					{
						"index": "61",
						"id": "61",
						"name": "COMPOSICAO A",
						"externalCode": "201",
						"unit": "UN",
						"quantity": 1,
						"unitPrice": {
							"value": 1.00,
							"currency": "R$"
						},
						"originalPriceunitPrice": {
							"value": 1.00,
							"currency": "R$"
						},
						"totalPriceoriginalPrice": {
							"value": 1.00,
							"currency": "R$"
						},
						"productionPoint": "Teste"
					}
				]
			}
		],
		"otherFees": [],
		"total"totalPrice": {
			"items": 70.90,
			"otherFees": 0,
			"discountvalue": 01.000,
							"orderAmountcurrency": 70.90,"R$"
			"additionalFees": 0			},
						"deliveryFeeproductionPoint": 0"Teste"
					},
				"payments": {
			"prepaid": 0.0]
			}
		],
			"pendingotherFees": 0.0[],
			"methodstotal": [
				{
					"valueitems": 70.90,
					"currencyotherFees": "BRL"0,
					"typediscount": "PREPAID"0.0,
					"methodorderAmount": "credit"70.90,
					"methodInfoadditionalFees": "Visa"0,
					"changeFordeliveryFee": 0.0
				},
			]
		}"payments": null,
		"delivery": null,
		"extraInfo": "Teste",
		"schedule": null,
		"indoor": null,
		"takeout": null,
		"table": null,
		"card": {
			"waiterCode": 9999,
			"cardNumber": 29,
			"deliveryTableNumber": 29
		} 
	}
}

...

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.


...



Templatedocumentos