Перейти к содержанию

Резервирование

Получение списка резервов (табличное представление)

Метод: GET
URL: https://beta.api.gigma.ru/tables/reservations
Авторизация: Bearer token

Параметры запроса

  • query - поисковая строка
  • order_id - ID выбранного заказа
  • date_from - "дата с..." (от даты бронирования)
  • date_to - "дата по..." (от даты бронирования)

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

https://beta.api.gigma.ru/tables/reservations?query=номенклатура&date_from=2025-02-20

Ответ

При успешном действии возвращается HTTP код 200.

{
    "columns": [
        {
            "id": 178,
            "table_id": 22,
            "order": 0,
            "key": "code",
            "has_icon": 0,
            "text": "Код"
        },
        {
            "id": 179,
            "table_id": 22,
            "order": 1,
            "key": "order",
            "has_icon": 0,
            "text": "Заказ"
        },
        {
            "id": 180,
            "table_id": 22,
            "order": 2,
            "key": "created_at",
            "has_icon": 0,
            "text": "Дата"
        },
        {
            "id": 181,
            "table_id": 22,
            "order": 3,
            "key": "name",
            "has_icon": 1,
            "text": "Наименование"
        },
        {
            "id": 182,
            "table_id": 22,
            "order": 4,
            "key": "counterparty",
            "has_icon": 1,
            "text": "Клиент"
        },
        {
            "id": 183,
            "table_id": 22,
            "order": 5,
            "key": "warehouse",
            "has_icon": 1,
            "text": "Склад"
        },
        {
            "id": 184,
            "table_id": 22,
            "order": 6,
            "key": "source",
            "has_icon": 1,
            "text": "Источник"
        },
        {
            "id": 185,
            "table_id": 22,
            "order": 7,
            "key": "quantity",
            "has_icon": 0,
            "text": "Кол-во"
        },
        {
            "id": 186,
            "table_id": 22,
            "order": 8,
            "key": "price",
            "has_icon": 0,
            "text": "Цена"
        },
        {
            "id": 187,
            "table_id": 22,
            "order": 9,
            "key": "expired_at",
            "has_icon": 0,
            "text": "Срок до"
        },
        {
            "id": 188,
            "table_id": 22,
            "order": 10,
            "key": "is_active",
            "has_icon": 0,
            "text": "Активный"
        },
        {
            "id": 189,
            "table_id": 22,
            "order": 11,
            "key": "creator",
            "has_icon": 1,
            "text": "Добавил"
        }
    ],
    "reservations": [
        {
            "id": {
                "icon": null,
                "value": 193,
                "url": "https:\/\/erp-itecho.web.app\/inventories\/list-inventories\/57013"
            },
            "code": {
                "icon": null,
                "value": "1",
                "url": "https:\/\/erp-itecho.web.app\/inventories\/list-inventories\/57013"
            },
            "created_at": "2025-03-07T11:08:52.000000Z",
            "name": {
                "icon": "https:\/\/beta.api.gigma.ru\/\/storage\/uploads\/FCusoYbrnJTaiN8C0bWmNt4HxZLru0ItXEBaH9UW.jpg",
                "value": "Line Repair Nutrient Bio Satin Serum Сыворотка «Био-Сатин», 30 мл",
                "link": "https:\/\/erp-itecho.web.app\/inventories\/list-inventories\/57013"
            },
            "counterparty": {
                "icon": "https:\/\/beta.api.gigma.ru\/storage\/uploads\/default.svg",
                "value": "Крушанов Александр",
                "link": "https:\/\/erp-itecho.web.app\/counterparty\/list-counterparty\/121"
            },
            "warehouse": {
                "icon": "https:\/\/beta.api.gigma.ru\/\/storage\/uploads\/tsLs3JTSLCTFgSyDsdtxFsweHEbTTvn0HeqUepNr.webp",
                "value": "Склад для приложения",
                "link": "https:\/\/erp-itecho.web.app\/warehouses\/list-warehouses\/50"
            },
            "source": {
                "icon": "https:\/\/beta.api.gigma.ru\/storage\/uploads\/default.svg",
                "value": "Сей момент",
                "link": "https:\/\/erp-itecho.web.app\/ecommerce\/list-ecommerce\/37"
            },
            "quantity": 1,
            "price": "2100.00",
            "expired_at": "2025-03-08 08:28:02",
            "is_active": "Да",
            "creator": "-"
        }
    ],
    "pagination": {
        "total": 1,
        "per_page": 10,
        "current_page": 1,
        "last_page": 1,
        "from": 1,
        "to": 1
    }
}

Описание полей ответа

  • columns - массив столбцов
  • pagination - объект с информацией, необходимой для пагинации
  • reservations - массив объектов типа "Резерв"
  • pagination - поля для пагинации