---
metadata:
  - name: generator
    content: Diplodoc Platform v5.48.2
alternate:
  - https://yandex.com/dev/eda-vendor/doc/en/ref/Vendor-Management-Integration-API/partner.orders.history.post.md
  - https://yandex.com/dev/eda-vendor/doc/ru/ref/Vendor-Management-Integration-API/partner.orders.history.post.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/eda-vendor/doc/ru/llms.txt

<div class="openapi">

# Получение истории заказов

<!-- markdownlint-disable-file -->

Позволяет получать информацию по заказам. Заказы можно фильтровать по нескольким фильтрам:
    - Статус заказа
    - Дате создания заказа
    - Сервису, в котором сделан заказ

Ограничения метода:
    - Максимальное количество заказов в ответе - 1000
    - История хранится для заказов за последние 180 дней


## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
/v1/orders-history
```

</div>

</div>

</div>

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "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
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_from_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Дата, с которой нужно отдать заказы. В формате RFC3339 с дробной частью секунд (Y-m-d\TH:i:s.uP)

_Example:_{.json-schema-reset .json-schema-example} `2024-01-01T12:00:05.125+03:00`
{.table-cell}
||
||

_origin_ids_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [OriginIds](#entity-OriginIds)[]

Список объектов. Объект состоит из идентификатора ресторана на стороне партнера и типа доставки в этом ресторане.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "origin_id": "example",
    "delivery_type": "native"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_pagination_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [Pagination](#entity-Pagination)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "limit": 0,
  "offset": 0
}
```

{% endcut %}
{.table-cell}
||
||

_to_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Дата, до которой нужно отдать заказы. В формате RFC3339 с дробной частью секунд (Y-m-d\TH:i:s.uP)

_Example:_{.json-schema-reset .json-schema-example} `2024-01-01T12:00:05.125+03:00`
{.table-cell}
||
||

_service_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [Service](#entity-Service)[]

Список сервисов, для которых нужно вернуть заказы

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "YE"
]
```

{% endcut %}
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [OrderHistoryStatus](#entity-OrderHistoryStatus)[]

Возвращать заказы, соответствующие переданному списку статусов

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  "NEW"
]
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### OriginIds {#entity-OriginIds}

#|
|| **Name** | **Description** ||
||

_origin_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Идентификатор ресторана на стороне партнера

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_delivery_type_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Тип доставки

_Enum:_{.json-schema-reset .json-schema-value} `native`, `marketplace`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "origin_id": "example",
  "delivery_type": "native"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### Service {#entity-Service}

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `YE`, `MD`

</div>

<div class="openapi-entity">

### OrderHistoryStatus {#entity-OrderHistoryStatus}

Статус заказа в системе Яндекс.Еды

**Type**: string | null

_Enum:_{.json-schema-reset .json-schema-value} `NEW`, `CANCELLED`, `DELIVERED`

</div>

<div class="openapi-entity">

### Pagination {#entity-Pagination}

#|
|| **Name** | **Description** ||
||

_offset_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Смещение/пагинация. Подробней про пагинациюю можно почитать на https://slack.engineering/evolving-api-pagination-at-slack/

_Min value:_{.json-schema-reset .json-schema-assertion} `0`
{.table-cell}
||
||

_limit_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Максимальное число заказов

_Min value:_{.json-schema-reset .json-schema-assertion} `0`

_Max value:_{.json-schema-reset .json-schema-assertion} `1000`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "limit": 0,
  "offset": 0
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "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,
      "cancel_reason": {
        "code": "place.missing_dish",
        "message": "Заказ был отменён на стороне пользователя"
      }
    }
  ]
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_orders_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [Order](#entity-Order)[]

Список заказов

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "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,
    "cancel_reason": {
      "code": "place.missing_dish",
      "message": "Заказ был отменён на стороне пользователя"
    }
  }
]
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### EatsId {#entity-EatsId}

Номер заказа в системе Яндекс.Еда

**Type**: string

_Min length:_{.json-schema-reset .json-schema-assertion} `13`

_Example:_{.json-schema-reset .json-schema-example} `230328-354380`

</div>

<div class="openapi-entity">

### DeliveryType {#entity-DeliveryType}

Тип доставки

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `native`, `marketplace`

</div>

<div class="openapi-entity">

### OriginId {#entity-OriginId}

**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `restaurant1`

</div>

<div class="openapi-entity">

### CancelReason {#entity-CancelReason}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код причины отмены заказа в Яндекс Еда

_Example:_{.json-schema-reset .json-schema-example} `place.missing_dish`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Текст причины отмены заказа

_Example:_{.json-schema-reset .json-schema-example} `Заказ был отменён на стороне пользователя`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "code": "place.missing_dish",
  "message": "Заказ был отменён на стороне пользователя"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### Order {#entity-Order}

#|
|| **Name** | **Description** ||
||

_cancel_reason_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [CancelReason](#entity-CancelReason)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "code": "place.missing_dish",
  "message": "Заказ был отменён на стороне пользователя"
}
```

{% endcut %}
{.table-cell}
||
||

_created_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Дата создания заказа

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_delivery_type_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [DeliveryType](#entity-DeliveryType)

Тип доставки

_Enum:_{.json-schema-reset .json-schema-value} `native`, `marketplace`
{.table-cell}
||
||

_eats_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [EatsId](#entity-EatsId)

Номер заказа в системе Яндекс.Еда

_Min length:_{.json-schema-reset .json-schema-assertion} `13`

_Example:_{.json-schema-reset .json-schema-example} `230328-354380`
{.table-cell}
||
||

_items_cost_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: number

Стоимость заказа для партнера за вычетом стоимости доставки (с учетом партнерских скидок)
{.table-cell}
||
||

_order_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Номер заказа на стороне партнера

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_origin_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [OriginId](#entity-OriginId)

Идентификатор ресторана в системе партнера, из которого был сделан заказ

_Example:_{.json-schema-reset .json-schema-example} `restaurant1`
{.table-cell}
||
||

_service_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [Service](#entity-Service)

Сервис, через который был сделан заказ

_Enum:_{.json-schema-reset .json-schema-value} `YE`, `MD`
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [OrderHistoryStatus](#entity-OrderHistoryStatus)

Статус заказа

Статус заказа в системе Яндекс.Еды

_Enum:_{.json-schema-reset .json-schema-value} `NEW`, `CANCELLED`, `DELIVERED`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "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,
  "cancel_reason": {
    "code": "place.missing_dish",
    "message": "Заказ был отменён на стороне пользователя"
  }
}
```

{% endcut %}

</div>

</div>

<div class="openapi__response__code__400">

## 400 Bad Request

Неуспешная валидация

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "message": "example",
  "code": "example"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Сообщение об ошибке

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__500">

## 500 Internal Server Error

Ошибка сервиса

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "message": "example",
  "code": "example"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_code_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Сообщение об ошибке

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.