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

Request

POST

/v1/orders-history

Body

application/json
{
  "origin_ids": [
    {
      "origin_id": "example",
      "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.

Example
[
  {
    "origin_id": "example",
    "delivery_type": "native"
  }
]

pagination

Type: Pagination

Example
{
  "limit": 0,
  "offset": 0
}

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

Example
[
  "YE"
]

status

Type: OrderHistoryStatus[]

Return orders that match the submitted list statuses

Example
[
  "NEW"
]

OriginIds

Name

Description

origin_id

Type: string

restraunt ID in the partner's system

Example: example

delivery_type

Type: string

Delivery type

Enum: native, marketplace

Example
{
  "origin_id": "example",
  "delivery_type": "native"
}

Service

Type: string

Enum: YE, MD

OrderHistoryStatus

Oredr status in the Yandex system

Type: string | null

Enum: NEW, CANCELLED, DELIVERED

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

Example
{
  "limit": 0,
  "offset": 0
}

Responses

200 OK

OK

Body

application/json
{
  "orders": [
    {
      "eats_id": "230328-354380",
      "order_id": "example",
      "created_at": "2025-01-01T00:00:00Z",
      "status": "NEW",
      "service": "YE",
      "delivery_type": "marketplace",
      "origin_id": "restaurant1",
      "items_cost": 0.5
    }
  ]
}

Name

Description

orders

Type: Order[]

List of orders

Example
[
  {
    "eats_id": "230328-354380",
    "order_id": "example",
    "created_at": "2025-01-01T00:00:00Z",
    "status": "NEW",
    "service": "YE",
    "delivery_type": "marketplace",
    "origin_id": "restaurant1",
    "items_cost": 0.5
  }
]

EatsId

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

Type: string

Min length: 13

Example: 230328-354380

DeliveryType

Delivery type

Type: string

Enum: native, marketplace

OriginId

Type: string

Example: restaurant1

Order

Name

Description

created_at

Type: string<date-time>

Order creation date

Example: 2025-01-01T00:00:00Z

delivery_type

Type: DeliveryType

Delivery type

Enum: native, marketplace

eats_id

Type: EatsId

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

Min length: 13

Example: 230328-354380

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

Example: example

origin_id

Type: OriginId

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

Order status

Oredr status in the Yandex system

Enum: NEW, CANCELLED, DELIVERED

Example
{
  "eats_id": "230328-354380",
  "order_id": "example",
  "created_at": "2025-01-01T00:00:00Z",
  "status": "NEW",
  "service": "YE",
  "delivery_type": "marketplace",
  "origin_id": "restaurant1",
  "items_cost": 0.5
}

400 Bad Request

Request error

Body

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

Name

Description

code

Type: string

Error code

Example: example

message

Type: string

Error message

Example: example

500 Internal Server Error

Internal server error

Body

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

Name

Description

code

Type: string

Error code

Example: example

message

Type: string

Error message

Example: example