❗️Order status

Method for retrieving order status.

Request

GET

/order/{orderId}/status

Path parameters

Name

Description

orderId*

Type: string

Order identifier in Partner’s system.

Responses

200 OK

Order status successfully provided.

Body

application/json
{
    "comment": "string",
    "packagesCount": 2,
    "reason": "place.unable_to_call",
    "status": "CANCELLED",
    "updatedAt": "1970-01-01T00:00:27.870000+00:20"
}

Name

Description

status*

Type: OrderStatus

Order status. Must be valid – e.g., an order that has already been assembled cannot be marked as new again. Status transitions are allowed only in the specified direction – from NEW to DELIVERED. Exception: the order can be moved to the CANCELLED status at any point. Status descriptions:

  • NEW – new order, just sent to the Partner system.
  • ACCEPTED_BY_RESTAURANT – order confirmed by the Partner.
  • COOKING – order assembly has started.
  • READY – order has been assembled.
  • TAKEN_BY_COURIER – courier picked up the order from the store.
  • DELIVERED – order completed.
  • CANCELLED – order cancelled.

Status flow: NEW → ACCEPTED_BY_RESTAURANT → COOKING → READY → TAKEN_BY_COURIER → DELIVERED.

From any status → CANCELLED

Enum: CANCELLED, ACCEPTED_BY_RESTAURANT, COOKING, READY, TAKEN_BY_COURIER, DELIVERED, NEW

comment

Type: string

Comment for the order status change

Example: string

packagesCount

Type: integer

Number of packages in the order, used to inform couriers

Example: 2

Min value: 0

reason

Type: string

Reason for order cancellation. Provided only when status is CANCELLED. Partner may pass custom cancellation reasons, subject to prior approval by the manager.

Example: place.unable_to_call

updatedAt

Type: string<date-time>

Date when the order status changed, in RFC3339 format with fractional seconds (Y-m-d\TH:i:s.uP).

Example: 1970-01-01T00:00:27.870000+00:20

OrderStatus

Order status. Must be valid – e.g., an order that has already been assembled cannot be marked as new again. Status transitions are allowed only in the specified direction – from NEW to DELIVERED. Exception: the order can be moved to the CANCELLED status at any point. Status descriptions:

  • NEW – new order, just sent to the Partner system.
  • ACCEPTED_BY_RESTAURANT – order confirmed by the Partner.
  • COOKING – order assembly has started.
  • READY – order has been assembled.
  • TAKEN_BY_COURIER – courier picked up the order from the store.
  • DELIVERED – order completed.
  • CANCELLED – order cancelled.

Status flow: NEW → ACCEPTED_BY_RESTAURANT → COOKING → READY → TAKEN_BY_COURIER → DELIVERED.

From any status → CANCELLED

Type

Description

OrderStatus

Enum: CANCELLED, ACCEPTED_BY_RESTAURANT, COOKING, READY, TAKEN_BY_COURIER, DELIVERED, NEW

400 Bad Request

Request error. The response is expected to contain an array with an object from the error list.

Body

application/json
[
    {
        "code": 400,
        "description": "Description of error"
    }
]

ErrorItem[]

ErrorItem

Name

Description

code*

Type: integer

Numeric error code agreed with Yango Deli.

Example: 400

description*

Type: string

Error description

Example: Description of error

401 Unauthorized

Authorisation failed – token expired or not provided in request.

Body

application/json
{
    "reason": "Access token has been expired. You should request a new one"
}

Name

Description

reason*

Type: string

The reason why authorisation failed.

Example: Access token has been expired. You should request a new one

404 Not Found

Order not found. The response is expected to contain an array with an object from the error list.

Body

application/json
[
    {
        "code": 400,
        "description": "Description of error"
    }
]

ErrorItem[]

500 Internal Server Error

Internal server errors. The response is expected to contain an array with an object from the error list.

Body

application/json
[
    {
        "code": 400,
        "description": "Description of error"
    }
]

ErrorItem[]

No longer supported, please use an alternative and newer version.