Возвращает заказы компании, от новых к старым: по дате заказа, а внутри одной даты по номеру. Строки заказов в список не входят, их возвращает [v1/orders/get_entry](https://developers.controlata.ru/hc/api-docs/articles/orders-get-entry).

```
v1/orders/get_list.php
```

## Параметры

| Поле | Тип | Обязательное | Описание |
|---|---|---|---|
| date_from | string | Нет | Заказы с этой даты заказа включительно |
| date_to | string | Нет | Заказы по эту дату заказа включительно |
| limit | int | Нет | Размер страницы, от 1 до 1000 |
| offset | int | Нет | Сколько записей пропустить |

Фильтры работают по date_placed. Без параметров возвращаются все заказы компании. Подробнее о постраничной выдаче в статье [Общие правила](https://developers.controlata.ru/hc/api-docs/articles/rules).

## Ответ

Массив orders с полями заказа (см. [Заказы](https://developers.controlata.ru/hc/api-docs/articles/orders)) и полями:

| Поле | Тип | Описание |
|---|---|---|
| shipments_count | int | Число отгрузок заказа |
| products_storage_name | string | Название склада продуктов |
| materials_storage_name | string | Название склада материалов |
| storage_id, storage_name | | Синонимы склада продуктов, оставлены для совместимости |
| customer_* | | Все поля покупателя: customer_id, customer_type, customer_name, customer_email, customer_phone, customer_address_real, customer_address_legal, customer_inn, customer_kpp, customer_ogrn, customer_agreement, customer_manager_name, customer_manager_post, customer_notes |

Поле total в корне ответа содержит общее число заказов, подходящих под фильтры. У заказа под производство products_storage_id равен «0», а название склада null.

## Пример запроса

```
{
    "date_from": "2026-10-01",
    "date_to": "2026-10-31",
    "limit": 100,
    "offset": 0
}
```

## Пример ответа

```
{
    "success": true,
    "orders": [
        {
            "id": "43727",
            "num": "A-1001",
            "status": "3",
            "payment": "2",
            "date_placed": "2026-10-06",
            "date_shipped": "2026-10-08",
            "total": "30000.00",
            "subtotal": "30500.00",
            "delivery_price": "500.00",
            "discount": "1000.00",
            "cost": "17800.00",
            "notes": "Заказ с сайта",
            "amount": "3.000",
            "lines": "2",
            "shipments_count": "1",
            "production": "0",
            "production_num": null,
            "source": "api",
            "products_storage_id": "3998",
            "products_storage_name": "Основной склад",
            "storage_id": "3998",
            "storage_name": "Основной склад",
            "materials_storage_id": "3998",
            "materials_storage_name": "Основной склад",
            "customer_id": "512",
            "customer_type": "3",
            "customer_name": "Иван Петров",
            "customer_email": "ivan@example.com",
            "customer_phone": "+7 900 123-45-67",
            "customer_address_real": "г. Москва, ул. Лесная, д. 5, кв. 12",
            "customer_address_legal": "",
            "customer_inn": "",
            "customer_kpp": "",
            "customer_ogrn": "",
            "customer_agreement": "",
            "customer_manager_name": "",
            "customer_manager_post": "",
            "customer_notes": ""
        }
    ],
    "total": 1
}
```

## Ошибки

| Ошибка | Причина |
|---|---|
| Date is not a valid date in format YYYY-MM-DD | Неверная date_from или date_to |
| Invalid limit value. Must be between 1 and 1000 | Неверный limit |
| Invalid offset value. Must be 0 or greater | Неверный offset |
| Offset requires limit | Передан offset без limit |
