Get the order history

Allows receiving information about orders. Orders can be filtered by multiple filters:
- by order status
- by order creation date
- by the service where the order was placed
Limitations:
- The maximum number of orders in the response - 1000
- The orders history is stored for the last 180 days

Note

This method is only available by subscription.

Request

POST

/v1/orders-history

Body

application/json
{
    "origin_ids": [
        {
            "origin_id": "string",
            "delivery_type": "native"
        }
    ],
    "service": [
        "YE"
    ],
    "from": "2024-01-01T12:00:05.125+03:00",
    "to": "2024-01-01T12:00:05.125+03:00",
    "status": [
        "NEW"
    ],
    "pagination": {
        "limit": 0,
        "offset": 0
    }
}

Name

Description

from*

Type: string<date-time>

The date from which Orders should be given. In the RFC 3339 format with a fractional part of seconds (Y-m-d\TH:i:s.uP)

Example: 2024-01-01T12:00:05.125+03:00

origin_ids*

Type: OriginIds[]

A list of objects. The object consists of the identifier of the restaurant on the partner's side and the type of delivery in this restaurant.

pagination*

Type: Pagination

to*

Type: string<date-time>

The date before which Orders should be given. In the RFC 3339 format with a fractional part of seconds (Y-m-d\TH:i:s.uP)

Example: 2024-01-01T12:00:05.125+03:00

service

Type: Service[]

List of services to return orders for

Enum: YE, MD

status

Type: OrderHistoryStatus[]

Return orders that match the submitted list statuses
Oredr status in the Yandex system

Enum: NEW, CANCELLED, DELIVERED

OriginIds

Name

Description

origin_id*

Type: string

restraunt ID in the partner's system

delivery_type

Type: string

Delivery type

Enum: native, marketplace

Pagination

Name

Description

offset*

Type: integer

Offset/pagination. More about pagination on https://slack.engineering/evolving-api-pagination-at-slack/

Min value: 0

limit

Type: integer

Maximum number of orders

Min value: 0

Max value: 1000

Service

Type

Description

Service

Enum: YE, MD

OrderHistoryStatus

Oredr status in the Yandex system

Type

Description

OrderHistoryStatus

Enum: NEW, CANCELLED, DELIVERED

Responses

200 OK

OK

Body

application/json
{
    "orders": [
        {
            "eats_id": "230328-354380",
            "order_id": "string",
            "created_at": "2022-12-29T18:02:01Z",
            "status": "NEW",
            "service": "YE",
            "delivery_type": "marketplace",
            "origin_id": "restaurant1",
            "items_cost": 0
        }
    ]
}

Name

Description

orders*

Type: Order[]

List of orders

Order

Name

Description

created_at

Type: string<date-time>

Order creation date

delivery_type

Type: DeliveryType

Delivery type

Example: marketplace

Enum: native, marketplace

eats_id

Type: string

End-to-end order identifier on the Yandex side in the format DDDDDD-DDDDDDDD

Example: 230328-354380

Min length: 13

items_cost

Type: number

The cost of the order for the partner minus the cost delivery (including partner discounts)

order_id

Type: string

Order identifier on the partners side

origin_id

Type: string

The ID of the restaurant in the partner's system

Example: restaurant1

service

Type: Service

A service that facilitated the placement of an order

Enum: YE, MD

status

Type: OrderHistoryStatus

Oredr status in the Yandex system

Enum: NEW, CANCELLED, DELIVERED

DeliveryType

Delivery type

Type

Description

DeliveryType

Example: marketplace

Enum: native, marketplace

400 Bad Request

Request error

Body

application/json
{
    "message": "string",
    "code": "string"
}

Name

Description

code*

Type: string

Error code

message*

Type: string

Error message

500 Internal Server Error

Internal server error

Body

application/json
{
    "message": "string",
    "code": "string"
}

Name

Description

code*

Type: string

Error code

message*

Type: string

Error message

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