Páginas filhas
  • API Order Mesa - Get Status

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 pedido específico HTTP Status Code = 208
linenumberstrue
{
	"errors": [
		{
			"key": "orderKeyType_orderKey",
			"message": "Order status request already exists: TABLE_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 pedido solicitado.

...

.


...


Bloco de código
titleJSON de resposta do retorno de um pedido
linenumberstrue
{
	"success": true,
	"error": null,
	"integrationHubServiceId": "1853f0ab-faf7-47d6-a193-610b20807143",
	"orderKeyType": "TABLE",
	"orderKey": [
		"40"
	],
	"lastestUpdatedStatus": "2024-06-28 09:04:06",
	"items": [
		{
			"id": "50425147-5d06-4b87-a05b-4586f2dccc71",
			"status": {
				"code": 505,
				"description": "TABLE_IN_USE"
			},
			"deliveryAgent": null,
			"deliveryDateTime": null,
			"cancellationReason": null,
			"tableCardNumber": "40"
		}
	]
}
Nota
titleNota: HTTP Status Code = 226 IM Used

A solicitação foi processada com sucesso e o resultado foi retornado conforme esperado.


...

04. Retornar o status de múltiplos pedidos:

Bloco de código
titleJSON Para retornar múltiplos pedidos
linenumberstrue
{
  "integrationHubServiceId": "7056c970-cb11-400f-9d4f-9f30253f3b0b",
  "orderKeyType": "TABLE",
  "orderKey": ["40", "20"]
}


...


Bloco de código
title

...

JSON de

...

retorno de múltiplos pedidos
Bloco de código
linenumberstruetitleJSON Para retornar múltiplos pedidos
{
	"success": true,
	"error": null,
	"integrationHubServiceId": "647469f8-b31b-4fae-ba33-99e04def555b",
	"orderKeyType": "TABLE",
	"orderKey": [
		"18",
		"19"
	],
	"lastestUpdatedStatus": "2024-06-28 09:13:46",
	"items": [
		{
			"id": "8c3752a1-ae15-42a1-bafb-189ca95f0211",
			"status": {
				"code": 505,
				"description": "TABLE_IN_USE"
			},
			"deliveryAgent": null,
			"deliveryDateTime": null,
			"cancellationReason": null,
			"tableCardNumber": "18"
		},
		{
			"id": "5ebf990f-9075-462c-b675-a8c57a350d61",
			"status": {
				"code": 504,
				"description": "OPEN_TABLE"
			},
			"deliveryAgent": null,
			"deliveryDateTime": null,
			"cancellationReason": null,
			"tableCardNumber": "19"
		}
	]
}

...

Bloco de código
titleJSON Inválido
linenumberstrue
{
    "integrationHubServiceId": "393d9572-2ec9-4cda-9ad3-5b69e02c988d",
	  "orderKeyType": "string",
		   "orderKey": ["string"]
}
Bloco de código
titleJSON Resposta
linenumberstrue
{
	"errors": [
		{
			"key": "orderKeyType",
			"message": "body.orderKeyType must be one of [ORDER_ID, TABLE, CARD]"
		}
	]
}

...

Bloco de código
titleJSON Resposta
linenumberstrue
{
	"errors": [
		{
			"key": "orderKeyType",
			"message": "body.orderKeyType is required"
		},
		{
			"key": "orderKey",
			"message": "body.orderKey is required"
		}
	]
}

...

03. GUID incorreto 



Bloco de código
titleJSON com o GUID inválido
linenumberstrue
{
    "integrationHubServiceId": "9a1cf326-c962-456f-8c49-c1bb2f340fc6A",
	  "orderKeyType": "TABLE",
	  "orderKey": []
}



Bloco de código
titleJSON Inválido GUID incorreto
{
	"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": "808c143d-d6d4-4b95-8c37-efa3a934f222",
	  "orderKeyType": "TABLE",
		  "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
titleJSON
linenumberstrue
{
    "integrationHubServiceId": "8f7949c3-cdd6-4db0-8746-369e651026b4",
	  "orderKeyType": "TABLE",
		  "orderKey": []
}
Bloco de código
titleHTTP Status Code 412 = Precpndition Failed
{
	"message": "NOT_FOUND",
	"code": 412
}

...