Páginas filhas
  • API Order Cartão - Get Consumption

Versões comparadas

Chave

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

...

Bloco de código
titleJSON de resposta do retorno de um consumo específico HTTP Status Code = 208
linenumberstrue
{
	"errors": [
		{
			"key": "orderKeyType_orderKey",
			"message": "Order consumption request already exists: TABLECARD_40"
		}
	]
}  
 
Nota
titleNota: HTTP Status Code = 208 Already Reported

A solicitação já foi enviada. É necessário aguardar alguns momentos e, em seguida, entrar em contato no mesmo endereço para obter o status do consumo solicitado.

...

Bloco de código
titleJSON Para retornar múltiplos consumos
linenumberstrue
{
  "integrationHubServiceId": "66ca34be-a568-4444-a78d-098a68686e58",
  "orderKeyType": "TABLECARD",
  "orderKey": ["340", "350"]
}

...

Bloco de código
titleJSON com o GUID inválido
linenumberstrue
{
    "integrationHubServiceId": "66ca34be-a568-4444-a78d-098a68686eAA",
	  "orderKeyType": "TABLECARD",
	  "orderKey": []
}
Bloco de código
titleJSON Inválido GUID incorreto
linenumberstrue
{
	"errors": [
		{
			"key": "integrationHubServiceId",
			"message": "body.integrationHubServiceId must be a valid GUID"
		}
	]
}

...

Bloco de código
titleJSON com sem informar o código da orderKey
linenumberstrue
{
    "integrationHubServiceId": "66ca34be-a568-4444-a78d-098a68686e58",
	  "orderKeyType": "TABLECARD",
	  "orderKey": [""]
}
Bloco de código
titleJSON Response
linenumberstrue
{
	"errors": [
		{
			"key": 0,
			"message": "body.orderKey[0] is not allowed to be empty"
		}
	]
}

...

Bloco de código
titleIntegration Hub Code Inválido
linenumberstrue
{
    "integrationHubServiceId": "f1b874af-96ab-4535-aac3-25118fe586cc",
	  "orderKeyType": "TABLECARD",
		  "orderKey": ["350"]
}
Bloco de código
titleJSON Response
linenumberstrue
{
	"errors": [
		{
			"key": "integrationHubServiceId",
			"message": "Provider Merchant for integrationHubServiceId \"f1b874af-96ab-4535-aac3-25118fe586cc\" not found or disabled"
		}
	]
}

...

Bloco de código
titleJSON da requisição
linenumberstrue
{
    "integrationHubServiceId": "66ca34be-a568-4444-a78d-098a68686e58",
	  "orderKeyType": "TABLECARD",
		  "orderKey": ["340", "350"]
}
Bloco de código
titleResposta da última execução
linenumberstrue
{
	"success": true,
	"error": null,
	"integrationHubServiceId": "7d7d205b-83ba-47c5-91ba-e4f32a2bbd9e",
	"orderKeyType": "TABLECARD",
	"orderKey": [
		"20",
		"40"
	],
	"consumption": [
		{
			"orderId": "f5fee4b4-c13f-482d-8e98-0dd840629e02",
			"type": "TABLE",
			"createdAt": "2024-06-28 17:27:20",
			"customerName": "TOTVS",
			"items": [
				{
					"id": "39735945",
					"index": "4",
					"name": "MARACUJA",
					"externalCode": "58",
					"unit": "UNIT",
					"ean": "",
					"quantity": 1,
					"specialInstructions": "TESTE",
					"unitPrice": {
						"value": 61,
						"currency": "R$"
					},
					"optionsPrice": {
						"value": 0,
						"currency": "R$"
					},
					"totalPrice": {
						"value": 61,
						"currency": "R$"
					},
					"options": null,
					"productionPoint": [
						{
							"name": "NENHUM"
						}
					]
				}
			],
			"otherFees": [
				{
					"name": "Taxa de Serviço",
					"type": "SERVICE_FEE",
					"receivedBy": "MERCHANT",
					"receiverDocument": "",
					"price": {
						"value": 6.1,
						"currency": "R$"
					},
					"observation": ""
				}
			],
			"discounts": [],
			"total": {
				"items": 61,
				"otherFees": 6.1,
				"discount": 0,
				"orderAmount": 67.1
			},
			"delivery": null,
			"takeout": null,
			"indoor": null,
			"table": {
				"waiterCode": 9999,
				"tableNumber": 20,
				"chairNumber": 0
			},
			"card": null
		}
	]
}

...