Páginas filhas
  • API Order Mesa - Get Consumption

Versões comparadas

Chave

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

...

02. ENDPOINT
Âncora
endpoint
endpoint


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


...

03. EXEMPLO DE UTILIZAÇÃO

01. Retornar todos os status dos consumos:

Âncora
todos_status
todos_status

...

Nota
titleNota: HTTP Status Code = 202 Accepted

A solicitação foi aceita, mas ainda não foi processada. É necessário aguardar alguns momentos e, em seguida, entrar em contato no mesmo endereço para obter o status do pedido consumo solicitado.


...


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: TABLE_40"
		}
	]
}  
 

...

Bloco de código
titleJSON Inválido
linenumberstrue
{
    "integrationHubServiceId": "393d9572a9cad639-2ec95775-4cda4f8a-9ad3917b-5b69e02c988d2ae0f2d284d8",
	  "orderKeyType": "string",
	   "orderKey": ["string"]
}

...

Bloco de código
titleURL enviada incorreda
https://api-barramento.meuelevestage.com/order/getStatuSgetConsumptions
Bloco de código
titleJSON Response para URL incorreta
linenumberstrue
{
	"message": "Missing Authentication Token"
}
Nota
titleNota: HTTP Status Code = 403 - Forbidden

O cliente não incluiu um token de autenticação válido no cabeçalho enviou a URL incorreta para solicitação da requisição.


...


  • HTTP Status Code 404 - Not Found
    Âncora
    status_code_404
    status_code_404

...

  • HTTP Status Code 412 - Precondition Failed
    Âncora
    status_code_412
    status_code_412
    VERIFICAR COM O KENNEDY

O código de status HTTP 412, conhecido como "Precondition Failed" (Pré-condição Falhou), indica que o servidor não atendeu a uma das pré-condições que o cliente colocou no cabeçalho da requisição. 

...

Bloco de código
titleJSON da requisição
linenumberstrue
{
    "integrationHubServiceId": "7d7d205b-83ba-47c5-91ba-e4f32a2bbd9e",
	  "orderKeyType": "TABLE",
		"orderKey": ["20", "540"]
}
Bloco de código
titleResposta da última execução
linenumberstrue
{
	"success": true,
	"error": null,
	"integrationHubServiceId": "7d7d205b-83ba-47c5-91ba-e4f32a2bbd9e",
	"orderKeyType": "TABLE",
	"orderKey": [
		"520",
	],
	"lastestUpdatedStatus": "2024-07-02 18:54:28"40"
	],
	"itemsconsumption": [
		{
			"idorderId": "de9fd388f5fee4b4-c223c13f-4325482d-a64d8e98-08889250f8390dd840629e02",
			"statustype": {"TABLE",
				"codecreatedAt": 504 "2024-06-28 17:27:20",
				"descriptioncustomerName": "OPEN_TABLE"
TOTVS",
			"items": [
				},{
					"deliveryAgentid": null"39735945",
					"deliveryDateTimeindex": null"4",
					"cancellationReasonname": null"MARACUJA",
					"tableCardNumberexternalCode": "558",
		}
	]
}			"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
		}
	]
}
Nota
titleNota: HTTP Status Code = 429 - Too Many Requests

Alguma regra para atender ao seu pedido não foi cumprida; analise o corpo da resposta para descobrir as razões.

...

...