Páginas filhas
  • New Order Mesa - Itens Fracionado com Adicionais

Versões comparadas

Chave

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

...

Este endpoint permite o envio de requisições para a criação de novos pedidos na API Order , especificamente para pedidos realizados em mesa, utilizando a barramento de serviços. A estrutura JSON apresentada ilustra um exemplo de payload para o endpoint newOrder, destinado ao registro de pedidos com itens de valor fracionando incluindo adicionais no pedido.

...

Bloco de código
titleJSON para pedido com item fracionado
linenumberstrue
{
   "integrationHubServiceId":"a13ea12d3fea8768-1ffcbbd9-4f4c454b-a3e89e7b-a384fe0e9e0540841e9a6812",
   "data":{
      "id":"f853a079-d0cb-4612-847f-430460485c02",
      "type":"TABLE",
      "displayId":"29",
      "createdAt":"2024-06-24T17:35:00",
      "orderTiming":"2024-06-24T17:40:24",
      "preparationStartDateTime":"2024-06-24T18:00:00",
      "merchant":{
         "id":"3d0cbd44-a6c4-469c-8ab3-c83700672ee1",
         "name":"BOTECO DO ALBINO"
      },
      "items":[
         {
            "id":"3973594022",
            "index":"22",
            "name":"MARACUJA",
            "externalCode":"58",
            "unit":"UN",
            "quantity":0.5,
            "specialInstructions":"Teste",
            "unitPrice":{
               "value":61.00,
               "currency":"R$"
            },
            "optionsPrice":{
               "value":0.0,
               "currency":"R$"
            },
            "totalPrice":{
               "value":30.50,
               "currency":"R$"
            },
            "otherFees":[]
         }
      ],
      "total":{
         "items":30.50,
         "otherFees":0,
         "discount":0.00,
         "orderAmount":20.50,
         "additionalFees":0,
         "deliveryFee":0
      },
      "payments":{
         "prepaid":0.0,
         "pending":0.0,
         "methods":[
            {
               "value":30.50,
               "currency":"BRL",
               "type":"PREPAID",
               "method":"credit",
               "methodInfo":"Visa",
               "changeFor":0.0
            }
         ]
      },
      "delivery":null,
      "extraInfo":"Teste",
      "schedule":null,
      "indoor":null,
      "takeout":null,
      "table":{
         "waiterCode":"9999",
         "tableNumber":"29",
         "chairNumber":"1"
      },
      "card":null
   }
}

...

Bloco de código
titleJSON Inválido
linenumberstrue
{
	"integrationHubServiceId": "299f76ba3fea8768-3ac3bbd9-4cc1454b-abaf9e7b-fac5a2510d8c40841e9a6812",
	"data": {
		"id": "fa3a2d45-3a29-4136-95e7-692d93db8b2b",
		"type": "TABLE",
		"displayId": "55",
		"createdAt": "2024-06-24T17:35:00",
		"orderTiming": "2024-06-24T17:40:24",
		"preparationStartDateTime": "2024-06-24T18:00:00",		
		"items": [
			{
				"id": "54",
				"index": "54",
				"name": "MARACUJA",
				"externalCode": "58",
				"unit": "UN",
				"quantity": 1.0,
				"specialInstructions": "Teste",
				"unitPrice": {
					"value": 61.00,
					"currency": "R$"
				},
				"optionsPrice": {
					"value": 0.0,
					"currency": "R$"
				},
				"totalPrice": {
					"value": 61.00,
					"currency": "R$"
				}
			}
		],
		"otherFees": [],
		"total": {
			"items": 61.0,
			"otherFees": 0,
			"discount": 0.0,
			"orderAmount": 61.0,
			"additionalFees": 0,
			"deliveryFee": 0
		},
		"payments": {
			"prepaid": 0.0,
			"pending": 0.0,
			"methods": [
				{
					"value": 61.0,
					"currency": "BRL",
					"type": "PREPAID",
					"method": "credit",
					"methodInfo": "Visa",
					"changeFor": 0.0
				}
			]
		},
		"delivery": null,
		"extraInfo": "Teste",
		"schedule": null,
		"indoor": null,
		"takeout": null,
		"table": {
			"waiterCode": "9999",
			"tableNumber": "54",
			"chairNumber": "1"
		},
		"card": null
	}
}

...

Bloco de código
titleIntegration Hub Code Inválido
linenumberstrue
{
	"integrationHubServiceId": "3fea8768f1b874af-bbd996ab-454b4535-9e7baac3-40841e9a681225118fe586c",
	"data": {
		"id": "f1bddb3f-63c4-4b2f-be53-e4527275ad9d",
		"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": {
					"value": 0.0,
					"currency": "R$"
				},
				"totalPrice": {
					"value": 61.00,
					"currency": "R$"
				}
			}
		],
		"otherFees": [],
		"total": {
			"items": 61.0,
			"otherFees": 0,
			"discount": 0.0,
			"orderAmount": 61.0,
			"additionalFees": 0,
			"deliveryFee": 0
		},
		"payments": {
			"prepaid": 0.0,
			"pending": 0.0,
			"methods": [
				{
					"value": 61.0,
					"currency": "BRL",
					"type": "PREPAID",
					"method": "credit",
					"methodInfo": "Visa",
					"changeFor": 0.0
				}
			]
		},
		"delivery": null,
		"extraInfo": "Teste",
		"schedule": null,
		"indoor": null,
		"takeout": null,
		"table": {
			"waiterCode": "9999",
			"tableNumber": "54",
			"chairNumber": "1"
		},
		"card": null
	}
}

...

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 fracionado, adicionais, descontos e taxa  acesse a documentação clicando aqui.

...



Templatedocumentos