{
  "openapi": "3.1.0",
  "info": {
    "title": "Itecho ERP",
    "version": "1.0.0",
    "description": "Документация Itecho ERP и E-Commerce API: справочник методов, параметры запросов, примеры ответов.\n\n**Перед использованием прочитайте [`erp-rules.txt`](/erp-rules.txt)** — единственный источник правды для агента: auth-flow, форматы данных, ловушки, готовые use-case сценарии.\n\n## Use-case сценарии (end-to-end композиции из endpoint'ов)\n\nПолная проза каждого сценария — в [erp-rules.txt §17](https://artypoul-docs-gigma-7b80.twc1.net/erp-rules.txt). Для агента доступны два machine-readable канала:\n\n- **Корень спеки** `x-use-cases[]` — массив сценариев с пошаговыми инструкциями (`{id, title, confidence, goal, steps:[{n, method, path, description, unverified?}]}`). Доступ через `jq '.\"x-use-cases\"[] | select(.id==\"17.2\")'`.\n- **На каждой операции** `x-used-in: [\"17.2\", \"17.6\"]` — список сценариев, в которых эта операция используется. Доступ через `jq '.paths[\"/api/files\"].post.\"x-used-in\"'`.\n\n| § | Сценарий | Уверенность | Ключевые endpoint'ы |\n|---|---|---|---|\n| 17.1 | **Купить от лица клиента** (E-Commerce, end-to-end) | ⚠ unverified | `/api/counterparty/login` → `/api/counterparty/products` → `/api/counterparty/orders/precalculate` → `/api/counterparty/orders` |\n| 17.2 | **CRM: найти и обновить контрагента** | ✅ verified | `/api/login` → `/api/counterparties?query=…` → `/api/counterparties/{id}` (GET/PUT) → `/api/counterparties/{id}/history` |\n| 17.3 | **Заполнить витрину** (бизнес → магазин → склад → товар) | ✅ частично | `/api/login` → `/api/branches` → `/api/branches/{id}/bank_requisites` → `/api/shops` ⚠ → `/api/warehouses` ⚠ → `/api/nomenclatures` ⚠ |\n| 17.4 | **Обработать заказ оператором** | ⚠ unverified | `/api/order_statuses` → `/api/tables/orders` → `/api/orders/{id}` → `/api/reservations` ⚠ |\n| 17.5 | **Запустить промоакцию** | ⚠ unverified | `/api/sales_strategies` → `/api/promotions` ⚠ → проверка на E-Commerce витрине |\n| 17.6 | **Загрузить файл и привязать** | ✅ verified | `/api/files` (multipart) → `PUT /api/<resource>/{id}` с `avatar_id` |\n| 17.7 | **Импорт товаров из Excel на склад** (ETL) | ⚠ unverified | Pre-flight справочники → `/api/files` (batch) → `/api/nomenclatures` (batch) → `/api/inventories` (batch). Полный 10-шаговый flow с rate-limit и resume-после-crash в §17.7. |\n\n## Фильтры на listing-эндпоинтах\n\nПередаются как query-параметры. Конвенции стабильны на всех `GET`-коллекциях и `GET /api/tables/*`. Точный набор полей зависит от ресурса; машиночитаемая сводка — в корне спеки `x-filter-conventions`.\n\n| Тип | Формат | Пример |\n|---|---|---|\n| Точное совпадение | `?field=value` | `?is_company=true` |\n| Массив (OR) | `?field[]=v1&field[]=v2` | `?counterparty_type_id[]=2&counterparty_type_id[]=3` |\n| Диапазон дат | `?date_from=YYYY-MM-DD&date_to=YYYY-MM-DD` | `?date_from=2026-01-01&date_to=2026-12-31` |\n| Сравнение чисел | `?<field>_gt=N&<field>_lt=M` | `?credit_gt=100&credit_lt=1000` |\n| Полнотекстовый поиск | `?query=string` (кириллицу URL-encode) | `?query=%D0%B8%D0%B2%D0%B0%D0%BD%D0%BE%D0%B2` |\n\n`page` / `per_page` — общие для всех пагинированных GET (см. `components.parameters.Page` / `PerPage`).\n\n## Общее для всех write-операций\n\n- **Авторизация:** `Authorization: Bearer <id>|<secret>` (Sanctum). Разделитель `|` обязателен.\n- **Headers:** `Accept: application/json`, `Content-Type: application/json` (для файлов — `multipart/form-data`).\n- **Успех:** диапазон `2xx` (200 на GET/PUT, **201** на POST-create, **204** на DELETE). НЕ равенство `=== 200`.\n- **Rate limit:** ~60 запросов/минуту на токен. Для импортов ≤1 rps, ≤5 параллельных.\n- **5xx на POST → первая гипотеза «неполное тело»**, не «упал сервер». Сверить со схемой, не повторять.\n- **POST не идемпотентен.** Перед запросом — подтверждение пользователя одним блоком.\n\nПолные правила — в [`erp-rules.txt`](/erp-rules.txt).",
    "contact": {
      "url": "https://artypoul-docs-gigma-7b80.twc1.net"
    }
  },
  "externalDocs": {
    "description": "erp-rules.txt — полный гайд для агента (21 раздел, 1249 строк)",
    "url": "https://artypoul-docs-gigma-7b80.twc1.net/erp-rules.txt"
  },
  "servers": [
    {
      "url": "https://api.gigma.ru/api",
      "description": "Production"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerErpAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Sanctum: <id>|<secret> (ERP, получен через POST /api/login)",
        "description": "Токен сотрудника ERP. Логин: `POST /api/login` с `{ login, password }`. Используй `access_token.value` целиком, включая `|`."
      },
      "bearerEcomAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Sanctum: <id>|<secret> (E-Commerce, получен через POST /api/counterparty/login)",
        "description": "Токен клиента E-Commerce. Логин: `POST /api/counterparty/login` с `{ phone, password }`."
      }
    },
    "parameters": {
      "Page": {
        "name": "page",
        "in": "query",
        "required": false,
        "description": "Номер страницы, с 1 (erp-rules §5).",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "default": 1
        }
      },
      "PerPage": {
        "name": "per_page",
        "in": "query",
        "required": false,
        "description": "Размер страницы. Дефолт 15.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 200,
          "default": 15
        }
      },
      "Query": {
        "name": "query",
        "in": "query",
        "required": false,
        "description": "Полнотекстовый поиск. Кириллицу URL-encode.",
        "schema": {
          "type": "string"
        }
      },
      "DateFrom": {
        "name": "date_from",
        "in": "query",
        "required": false,
        "description": "Нижняя граница диапазона дат, формат `YYYY-MM-DD` (erp-rules §6).",
        "schema": {
          "type": "string",
          "format": "date"
        }
      },
      "DateTo": {
        "name": "date_to",
        "in": "query",
        "required": false,
        "description": "Верхняя граница диапазона дат, формат `YYYY-MM-DD`.",
        "schema": {
          "type": "string",
          "format": "date"
        }
      }
    },
    "schemas": {
      "Paginated": {
        "type": "object",
        "description": "Простой пагинированный envelope (erp-rules §5). Эндпоинт переопределяет тип `items[]`.",
        "properties": {
          "items": {
            "type": "array",
            "items": {}
          },
          "pagination": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer"
              },
              "per_page": {
                "type": "integer"
              },
              "current_page": {
                "type": "integer"
              },
              "last_page": {
                "type": "integer"
              },
              "from": {
                "type": "integer",
                "nullable": true
              },
              "to": {
                "type": "integer",
                "nullable": true
              }
            },
            "required": [
              "total",
              "per_page",
              "current_page",
              "last_page"
            ]
          }
        },
        "required": [
          "items",
          "pagination"
        ]
      },
      "TablesEnvelope": {
        "type": "object",
        "description": "Envelope для `GET /api/tables/*`. Ключ массива строк = имя ресурса (`nomenclatures`, `inventories`, ...). Каждое поле строки — НЕ плоское значение, а объект `{icon, value, url}` или `{value, link}` (pre-rendered для UI таблицы). Чтобы достать сырое значение — `row.<field>.value`.",
        "properties": {
          "columns": {
            "type": "array",
            "description": "Описание столбцов таблицы для UI.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "table_id": {
                  "type": "integer"
                },
                "order": {
                  "type": "integer"
                },
                "key": {
                  "type": "string",
                  "description": "Имя поля строки."
                },
                "has_icon": {
                  "type": "integer",
                  "enum": [
                    0,
                    1
                  ]
                },
                "text": {
                  "type": "string",
                  "description": "Человеко-читаемый заголовок."
                }
              }
            }
          },
          "pagination": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer"
              },
              "per_page": {
                "type": "integer"
              },
              "current_page": {
                "type": "integer"
              },
              "last_page": {
                "type": "integer"
              },
              "from": {
                "type": "integer",
                "nullable": true
              },
              "to": {
                "type": "integer",
                "nullable": true
              }
            },
            "required": [
              "total",
              "per_page",
              "current_page",
              "last_page"
            ]
          }
        },
        "required": [
          "columns",
          "pagination"
        ]
      },
      "LaravelPaginator": {
        "type": "object",
        "description": "Развёрнутый Laravel-paginator: `tables/*` и `*/history`. Содержит `links[]`, `first_page_url` и т.п.",
        "properties": {
          "data": {
            "type": "array",
            "items": {}
          },
          "current_page": {
            "type": "integer"
          },
          "last_page": {
            "type": "integer"
          },
          "per_page": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          },
          "from": {
            "type": "integer",
            "nullable": true
          },
          "to": {
            "type": "integer",
            "nullable": true
          },
          "path": {
            "type": "string"
          },
          "first_page_url": {
            "type": "string",
            "nullable": true
          },
          "last_page_url": {
            "type": "string",
            "nullable": true
          },
          "next_page_url": {
            "type": "string",
            "nullable": true
          },
          "prev_page_url": {
            "type": "string",
            "nullable": true
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "nullable": true
                },
                "label": {
                  "type": "string"
                },
                "active": {
                  "type": "boolean"
                }
              }
            }
          }
        },
        "required": [
          "data",
          "current_page",
          "last_page",
          "per_page",
          "total"
        ]
      },
      "LaravelError": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Unauthenticated."
          }
        },
        "required": [
          "message"
        ]
      },
      "LaravelValidationError": {
        "type": "object",
        "description": "Стандартный Laravel-422. Ключи `errors.*` могут быть вложенными через точку (например `products.0.id`). ⚠ Сообщения приходят **на русском** (locale=ru), не на английском — паттерн-матчить на «The X field is required.» НЕЛЬЗЯ.",
        "properties": {
          "message": {
            "type": "string",
            "example": "Поле login является обязательным.",
            "nullable": true
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "example": {
              "login": [
                "Поле login является обязательным."
              ],
              "password": [
                "Поле password является обязательным."
              ],
              "products.0.id": [
                "Выбранное значение для products.0.id некорректно."
              ]
            }
          }
        },
        "required": [
          "errors"
        ]
      }
    },
    "responses": {
      "Unauthenticated": {
        "description": "401 — нет / невалидный / протухший токен. Очистить локальный токен, повторить flow логина (см. erp-rules §2).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LaravelError"
            },
            "example": {
              "message": "Unauthenticated."
            }
          }
        }
      },
      "Forbidden": {
        "description": "403 — токен валидный, но нет прав. Проверить `user.permissions[]` (см. erp-rules §12.6).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LaravelError"
            },
            "example": {
              "message": "This action is unauthorized."
            }
          }
        }
      },
      "ValidationError": {
        "description": "422 — Laravel-валидация. Показать пользователю ключи `errors.*`. Ключи могут быть вложенными через точку (`products.0.id`).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LaravelValidationError"
            }
          }
        }
      },
      "RateLimited": {
        "description": "429 — превышение rate-limit (по умолчанию Laravel `throttle:api` = 60/min/токен). Подождать значение `Retry-After` или 60 сек, повторить.",
        "headers": {
          "Retry-After": {
            "description": "Секунд до следующей попытки. На проде может отсутствовать — fallback 60 сек.",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          "X-RateLimit-Limit": {
            "description": "Лимит запросов в окне.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Сколько запросов осталось в текущем окне.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LaravelError"
            },
            "example": {
              "message": "Too Many Attempts."
            }
          }
        }
      },
      "ServerError": {
        "description": "500 — внутренняя ошибка. ⚠ На write-методах бэкенд иногда возвращает 500 вместо 422 при неполном body (см. erp-rules §19.1). Первая гипотеза: «неполное тело», свериться со схемой, не повторять вслепую.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/LaravelError"
            },
            "example": {
              "message": "Server Error"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "E-Commerce / Авторизация"
    },
    {
      "name": "E-Commerce / Вспомогательные запросы"
    },
    {
      "name": "E-Commerce / Динамический контент"
    },
    {
      "name": "E-Commerce / Заказы"
    },
    {
      "name": "E-Commerce / Контрагент (клиент)"
    },
    {
      "name": "E-Commerce / Навигационная панель"
    },
    {
      "name": "E-Commerce / Справочники"
    },
    {
      "name": "E-Commerce / Страницы"
    },
    {
      "name": "E-Commerce / Товары"
    },
    {
      "name": "E-Commerce / Уведомления"
    },
    {
      "name": "ERP / Авторизация"
    },
    {
      "name": "ERP / Бизнесы"
    },
    {
      "name": "ERP / Блоки"
    },
    {
      "name": "ERP / Вспомогательные запросы"
    },
    {
      "name": "ERP / Задачи"
    },
    {
      "name": "ERP / Заказы"
    },
    {
      "name": "ERP / Контрагенты"
    },
    {
      "name": "ERP / Магазины"
    },
    {
      "name": "ERP / Меню"
    },
    {
      "name": "ERP / Номенклатура"
    },
    {
      "name": "ERP / Остатки"
    },
    {
      "name": "ERP / Пользователи"
    },
    {
      "name": "ERP / Приложения"
    },
    {
      "name": "ERP / Промоакции"
    },
    {
      "name": "ERP / Резервирование"
    },
    {
      "name": "ERP / Склады"
    },
    {
      "name": "ERP / Справочники"
    },
    {
      "name": "ERP / Страницы"
    },
    {
      "name": "ERP / Стратегии продаж"
    },
    {
      "name": "ERP / Файлы"
    }
  ],
  "x-use-cases": [
    {
      "id": "17.1",
      "title": "Купить от лица клиента (E-Commerce, end-to-end)",
      "confidence": "partial",
      "goal": "Клиент логинится, находит товар, оформляет заказ, отслеживает статус.",
      "steps": [
        {
          "n": 1,
          "method": "POST",
          "path": "/api/counterparty/send_password",
          "description": "Запрос пароля по телефону. В примерах используется условный пароль \"1111\"; на боевом сервере пароль приходит звонком/письмом."
        },
        {
          "n": 2,
          "method": "POST",
          "path": "/api/counterparty/login",
          "description": "Логин. Поле `phone` принимает **и email тоже** (валидатор детектит формат). Опциональный `device` (string, min:3, max:50) для разделения сессий. Из ответа сохранить `counterparty.access_token.value` как Bearer."
        },
        {
          "n": 3,
          "method": "GET",
          "path": "/api/counterparty/categories",
          "description": "Один раз за сессию: справочники категорий. Аналогично fetch /brands, /countries, /delivery_types, /payment_types — построить map id→name."
        },
        {
          "n": 4,
          "method": "GET",
          "path": "/api/counterparty/products",
          "description": "Каталог с фильтрами `?category_id[]=…&brand_id[]=…&query=…&sale=true`. Возвращает list с id, name, price (decimal-string), sale."
        },
        {
          "n": 5,
          "method": "GET",
          "path": "/api/counterparty/products/{id}",
          "description": "Карточка товара (опционально)."
        },
        {
          "n": 6,
          "method": "POST",
          "path": "/api/counterparty/orders/precalculate",
          "description": "Расчёт суммы заказа: продукты + delivery_type_id + опц. address. Возвращает итоги (товары/доставка/скидка/итого). ⚠ Rate-limit жёстче глобального: **30/минуту** (throttle:30,1). Кешируй результат на UI, не дёргай на каждое изменение поля. Не создаёт заказ."
        },
        {
          "n": 7,
          "method": "POST",
          "path": "/api/counterparty/orders",
          "description": "⚠ СВЕРЕНО по коду бэка. Required: `delivery_type_id` + `products[]` (с `id` и `quantity ≥ 1`). Conditional: `shop_id` если delivery_type=1; `delivery_subtype_id` если delivery_type=2; `delivery_subtype_param_id` если delivery_subtype=1; `address` если delivery_subtype=2. Опционально: `payment_type_id`, `promo_code` (regex `^[A-Za-z0-9-]+$`, max 64). NB: phone/comment **не принимаются** — это была неверная доку. Side effects: бэк ставит order_status_id=2 (Ожидание оплаты), started_at=now, считает pricing, резервирует товары, при payment_type_id=2 (card) создаёт YooKassa payment_link. POST не идемпотентен."
        },
        {
          "n": 8,
          "method": "GET",
          "path": "/api/counterparty/orders/{id}",
          "description": "Детали заказа с текущим статусом. Список всех — GET /api/counterparty/orders."
        },
        {
          "n": 9,
          "method": "GET",
          "path": "/api/counterparty/notifications",
          "description": "Уведомления о смене статуса. POST /api/counterparty/notifications/{id}/read — отметить прочитанным.",
          "unverified": true
        }
      ],
      "errors": [
        "401 → повторить шаги 1-2 (токен умер).",
        "422 от preCalculate/store с pricing-ошибкой имеет НЕСТАНДАРТНЫЙ формат: `{error: \"...\"}` (preCalculate) или `{message: \"...\"}` (store), без `errors` ключа. Парсить отдельно.",
        "422 с промокодом: `{message: \"...\", code: <number>}` — DiscountValidationException codes (CODE_NOT_FOUND и др).",
        "502 при отказе YooKassa: заказ автоматически отменён (order_status=6), промокод откатан — пользователю показать «попробуйте ещё раз».",
        "429 на /precalculate → throttle:30,1 (30/мин), не 60. Кешировать."
      ]
    },
    {
      "id": "17.2",
      "title": "CRM-операции: найти и обновить контрагента (ERP)",
      "confidence": "verified",
      "goal": "Оператор находит клиента по телефону, обновляет адрес и смотрит его заказы.",
      "steps": [
        {
          "n": 1,
          "method": "POST",
          "path": "/api/login",
          "description": "Логин оператора. Сохранить `user.access_token.value`. В примерах password=\"1111\" — условный; на боевом сервере пароль из письма."
        },
        {
          "n": 2,
          "method": "GET",
          "path": "/api/counterparties",
          "description": "Поиск по телефону: `?query=79991234567`. Возвращает массив counterparties[]. Если несколько — показать пользователю выбор."
        },
        {
          "n": 3,
          "method": "GET",
          "path": "/api/counterparties/{id}",
          "description": "Карточка. ⚠ Сверено: `is_company` поле НЕ возвращается в ответе ни в листинге, ни в детальной карточке — инферь по наличию `name`/`inn`/`kpp` (компания) vs `first_name`/`last_name`/`birthday` (физлицо). Wrapper key — `counterparty` (singular)."
        },
        {
          "n": 4,
          "method": "PUT",
          "path": "/api/counterparties/{id}",
          "description": "Обновление. ⚠ Перед PUT определи ветку (физ/юр) по полям из GET — серверу нужно передать is_company явно. Слать ВЕСЬ объект целиком (иначе остальные поля затрутся)."
        },
        {
          "n": 5,
          "method": "GET",
          "path": "/api/counterparties/{id}/history",
          "description": "⚠ Сверено: НЕ Laravel-пагинатор, а простой envelope `{histories[], historiesCount}`. Каждая запись: `{id, icon (\"done\"/...), color (\"success\"/...), title, description, dateTime}`. Поле `dateTime` — camelCase, не snake. Параметры `?page=&per_page=` могут не поддерживаться."
        },
        {
          "n": 6,
          "method": "GET",
          "path": "/api/tables/orders",
          "description": "⚠ Сверено: фильтры `?counterparty_id={id}` И `?client_id={id}` ОБА работают и дают РАЗНЫЕ результаты (counterparty_id — заказы, где контрагент=владелец; client_id — где контрагент=клиент). Это НЕ алиасы. Используй тот, который нужен по смыслу."
        }
      ],
      "errors": [
        "403 на шаге 4 → у юзера нет `edit-counterparties` (см. §12.6).",
        "422 на PUT → ключи: phone_1, email, inn (для компании) — стандартные правила."
      ]
    },
    {
      "id": "17.3",
      "title": "Заполнить витрину: бизнес → банк → магазин → склад → товар (ERP admin)",
      "confidence": "partial",
      "goal": "С нуля развернуть всё для приёма заказов: бизнес, реквизиты, точка, склад, номенклатура.",
      "steps": [
        {
          "n": 1,
          "method": "POST",
          "path": "/api/login",
          "description": "Логин администратора."
        },
        {
          "n": 2,
          "method": "POST",
          "path": "/api/branches",
          "description": "Создание бизнеса: title, name, code, inn, kpp, head, phone_1, email, address, legal_address, responsible_user_id. Ответ 201 — запомнить branch.id."
        },
        {
          "n": 3,
          "method": "POST",
          "path": "/api/branches/{branchId}/bank_requisites",
          "description": "Банковский реквизит. Авто-заполнение: POST /api/search_bank с {query: \"БИК\"} → шаблон."
        },
        {
          "n": 4,
          "method": "POST",
          "path": "/api/shops",
          "description": "Создание магазина с привязкой к branch_id. ⚠ Точная схема не сверена.",
          "unverified": true
        },
        {
          "n": 5,
          "method": "POST",
          "path": "/api/warehouses",
          "description": "Склад: name, address, storage_unit_id, city_id. ⚠ Не сверено.",
          "unverified": true
        },
        {
          "n": 6,
          "method": "POST",
          "path": "/api/nomenclatures",
          "description": "Товар/услуга. Перед запросом подтянуть 5 справочников: nomenclature_kinds, storage_units, vats, categories, brands. ⚠ Поля unit_id (НЕ /api/units!), vat_id — обязательно из справочников.",
          "unverified": true
        },
        {
          "n": 7,
          "method": "POST",
          "path": "/api/files",
          "description": "Фото товара (multipart, file_type_id=2). Затем PUT /api/nomenclatures/{id} с avatar_id=<file.id>."
        }
      ]
    },
    {
      "id": "17.4",
      "title": "Обработать заказ оператором (ERP)",
      "confidence": "partial",
      "goal": "Оператор фильтрует заказы, открывает, добавляет позицию (= резервирует), меняет статус.",
      "steps": [
        {
          "n": 1,
          "method": "POST",
          "path": "/api/login",
          "description": "Логин оператора."
        },
        {
          "n": 2,
          "method": "GET",
          "path": "/api/order_statuses",
          "description": "Карта статусов: map id→name для отображения. ⚠ Статусы оплаты захардкожены по ID в бэкенде: 2=ожидание оплаты, 22=оплачен, 6=отменён — платёжную логику вязать на эти ID, а не на имена (имена зависят от установки)."
        },
        {
          "n": 3,
          "method": "GET",
          "path": "/api/tables/orders",
          "description": "Фильтр: `?order_status_id[]=<id>&date_from=...&date_to=...&page=1&per_page=15`. Envelope = TablesEnvelope (rich cells {icon,value,url})."
        },
        {
          "n": 4,
          "method": "GET",
          "path": "/api/orders/{id}",
          "description": "Заказ с reservations[] (=строки заказа), контактами клиента, текущим статусом."
        },
        {
          "n": 5,
          "method": "POST",
          "path": "/api/orders/{order}/nomenclatures",
          "description": "⚠ Сверено по коду бэка: этот endpoint создаёт запись Reservation (OrderNomenclatureController использует модель Reservation для route-binding {nomenclature} в update/destroy). Required: только `quantity` (min:1). Опционально: nomenclature_id, storage_unit_id, price, vat_id. /api/reservations как отдельного ресурса НЕТ."
        },
        {
          "n": 6,
          "method": "PUT",
          "path": "/api/orders/{id}",
          "description": "Смена статуса: {order_status_id: <new>}. Order/UpdateRequest принимает те же поля что StoreRequest, все опциональны.",
          "unverified": true
        }
      ]
    },
    {
      "id": "17.5",
      "title": "Запустить дисконт-кампанию через промокод (ERP)",
      "confidence": "partial",
      "goal": "Маркетолог создаёт промокод-скидку, активирует, отслеживает использования.",
      "steps": [
        {
          "n": 1,
          "method": "POST",
          "path": "/api/login",
          "description": "Логин маркетолога."
        },
        {
          "n": 2,
          "method": "POST",
          "path": "/api/discounts",
          "description": "⚠ СВЕРЕНО по коду бэка. Required: `name`, `code` (UPPERCASE-цифры-дефисы, regex `^[A-Z0-9-]+$`, max 64; unique среди НЕ-архивных), `discount_type` (`percent`|`fixed`), `discount_value`. Опционально: status (`draft`|`active`|`paused`|`archived`), min_order_amount, max_discount_amount, total_usage_limit, per_client_usage_limit, starts_at/ends_at (после-или-равно), url (max 2048), audience (`all`|`new_clients`|`partners`|`custom`), description, application_id, branch_id. NB: НЕ путать с `POST /api/promotions` — там 500 на пустое тело, фича почти заброшена."
        },
        {
          "n": 3,
          "method": "POST",
          "path": "/api/discounts/{discount}/activate",
          "description": "Переключить статус в `active`. Альтернативы: `POST /api/discounts/{id}/pause` (→ paused), `POST /api/discounts/{id}/archive` (→ archived, нельзя реактивировать). Все три используют `ensureSameProject()` — нельзя манипулировать чужими."
        },
        {
          "n": 4,
          "method": "GET",
          "path": "/api/discounts/stats",
          "description": "Сводная статистика. Опц: `period` (YYYY-MM), `application_id`. Возвращает агрегат."
        },
        {
          "n": 5,
          "method": "GET",
          "path": "/api/tables/discounts/{discount}/usages",
          "description": "Лента использований промокода (TablesEnvelope). Фильтры: page, per_page (max 100), status, from/to (YYYY-MM-DD), counterparty_id, order_id, application_id, query (max 128). Сортировка: sort_by ∈ {used_at, final_amount, discount_amount, original_amount}, sort_dir ∈ {asc, desc}."
        },
        {
          "n": 6,
          "method": "GET",
          "path": "/api/counterparty/products",
          "description": "Проверка с витрины: товары соответствующего бренда/категории. Полная связка promo→order доступна агенту через DiscountUsage.status=reserved/confirmed (см. §18.8 erp-rules)."
        }
      ],
      "errors": [
        "POST /api/discounts с дублирующимся `code` (среди не-архивных в том же проекте) → 422 unique violation. Можно реюзать `code` ТОЛЬКО после `archive`.",
        "`POST /api/promotions` существует, но `POST {}` отдаёт 500 не 422 (бэк-баг, валидатор не настроен) — не использовать как альтернативу.",
        "`activate` после `archive` — операция работает на уровне валидатора, но code-unique нарушится если есть активный с тем же `code`."
      ]
    },
    {
      "id": "17.6",
      "title": "Загрузить файл и привязать (ERP)",
      "confidence": "verified",
      "goal": "Загрузить аватар контрагенту / договор сотруднику / документ к заказу.",
      "steps": [
        {
          "n": 1,
          "method": "POST",
          "path": "/api/files",
          "description": "multipart/form-data: file (binary), file_type_id (1=договор, 2=аватар, 3=файл заказа — см. §12.2), link (опц). Ответ 201 — запомнить file.id."
        },
        {
          "n": 2,
          "method": "PUT",
          "path": "/api/counterparties/{id}",
          "description": "Привязка через avatar_id=<file.id>. ⚠ PUT заменяет объект — слать ВСЕ поля, не только avatar_id (сначала GET, потом PUT merged)."
        },
        {
          "n": 3,
          "method": "POST",
          "path": "/api/orders/{id}/files",
          "description": "Прямая привязка к заказу: тот же multipart, БЕЗ file_type_id (бэк ставит ORDER_FILE=3 сам).",
          "unverified": true
        }
      ]
    },
    {
      "id": "17.7",
      "title": "Импорт товаров из Excel на склад (ETL)",
      "confidence": "unverified",
      "goal": "Распарсить .xlsx со списком товаров, залить в ERP с дедупом, картинками, rate-limit-aware.",
      "steps": [
        {
          "n": 1,
          "method": "POST",
          "path": "/api/login",
          "description": "Логин."
        },
        {
          "n": 2,
          "method": "GET",
          "path": "/api/brands",
          "description": "Pre-flight pass: загрузить все справочники одним батчем и построить map name→id: GET /api/brands, /categories, /countries, /nomenclature_kinds, /nomenclature_types, /storage_units, /vats, /warehouses. Кешировать локально (~/.gigma/dictionary.json)."
        },
        {
          "n": 3,
          "method": "POST",
          "path": "/api/files",
          "description": "Для каждой строки с фото: multipart-загрузка изображения (file_type_id=2). Соблюдать rate-limit ≤1 rps, ≤5 параллельных. Сохранить response.file.id → row.avatarId."
        },
        {
          "n": 4,
          "method": "GET",
          "path": "/api/nomenclatures",
          "description": "Дедуп по `?code=<sku>`. Стратегия из чек-листа: skip / update / duplicate (с суффиксом)."
        },
        {
          "n": 5,
          "method": "POST",
          "path": "/api/nomenclatures",
          "description": "Создание: name, code, kind_id, type_id, unit_id, vat_id, category_id, brand_id, country_id, price (decimal-string), cost, description, avatar_id. Ответ 201 → сохранить nomenclature.id.",
          "unverified": true
        },
        {
          "n": 6,
          "method": "POST",
          "path": "/api/inventories",
          "description": "Привязка к складу: warehouse_id, nomenclature_id, quantity, price, vat_id. ⚠ Точный path может быть /api/warehouses/{id}/inventories или /api/stock — проверять по 404/500.",
          "unverified": true
        }
      ],
      "errors": [
        "5xx на POST /api/nomenclatures → первая гипотеза «неполное тело» (§19.1), сверить со схемой, не повторять вслепую.",
        "422 → лог `errors.field`, пропустить строку, продолжить остальные.",
        "429 → backoff 60 сек."
      ]
    }
  ],
  "x-filter-conventions": {
    "description": "Конвенции query-параметров для listing-эндпоинтов (GET-коллекции, GET /api/tables/*). erp-rules §6.",
    "patterns": [
      {
        "id": "exact",
        "template": "?field=value",
        "description": "Точное совпадение по полю.",
        "example": "?is_company=true"
      },
      {
        "id": "array",
        "template": "?field[]=v1&field[]=v2",
        "description": "Массив значений, OR-логика. Имя поля повторяется с суффиксом `[]`.",
        "example": "?counterparty_type_id[]=2&counterparty_type_id[]=3"
      },
      {
        "id": "date_range",
        "template": "?date_from=YYYY-MM-DD&date_to=YYYY-MM-DD",
        "description": "Диапазон дат. Имена параметров фиксированные.",
        "example": "?date_from=2026-01-01&date_to=2026-12-31",
        "parameter_refs": [
          "#/components/parameters/DateFrom",
          "#/components/parameters/DateTo"
        ]
      },
      {
        "id": "comparison",
        "template": "?<field>_gt=N&<field>_lt=M",
        "description": "Числовое сравнение. Суффикс `_gt` (greater) или `_lt` (less) на ЛЮБОЕ числовое поле ресурса.",
        "example": "?credit_gt=100&credit_lt=1000"
      },
      {
        "id": "search",
        "template": "?query=string",
        "description": "Полнотекстовый поиск. Кириллицу URL-encode.",
        "example": "?query=иванов",
        "parameter_refs": [
          "#/components/parameters/Query"
        ]
      }
    ],
    "notes": [
      "Конкретный набор фильтруемых полей зависит от ресурса и в openapi.json не перечислен — определяется бэкендом.",
      "Если фильтр игнорируется (тот же результат с/без него) — поле не поддерживается этим ресурсом; запрашивать у бэк-команды.",
      "Пагинация `?page=N&per_page=M` независима от фильтров и применяется поверх них."
    ]
  },
  "paths": {
    "/api/counterparty/send_password": {
      "post": {
        "summary": "Отправка звонка-сброса с паролем",
        "operationId": "send-password",
        "tags": [
          "E-Commerce / Авторизация"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Password successfully send",
                      "description": "информационное сообщение об успешном выполнении операции"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Авторизация/#send-password"
        },
        "description": "#### Параметры запроса - `phone` — номер телефона контрагента",
        "x-used-in": [
          "17.1"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string",
                    "example": "79999999990",
                    "description": "номер телефона контрагента"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/counterparty/login": {
      "post": {
        "summary": "Авторизация",
        "operationId": "login",
        "tags": [
          "E-Commerce / Авторизация"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparty": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "идентификатор менеджера"
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2,
                              "description": "идентификатор менеджера"
                            },
                            "name": {
                              "type": "string",
                              "example": "Розница",
                              "description": "полное имя менеджера"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-23T10:27:06.000000Z",
                              "description": "дата создания"
                            }
                          },
                          "description": "объект с информацией о типе контрагента"
                        },
                        "manager": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "идентификатор менеджера"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Артём",
                              "description": "имя контрагента"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Полищук",
                              "description": "фамилия контрагента"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Николаевич",
                              "description": "отчество контрагента"
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём",
                              "description": "полное имя менеджера"
                            }
                          },
                          "description": "объект с информацией о менеджере"
                        },
                        "avatar": {
                          "type": "string",
                          "nullable": true
                        },
                        "first_name": {
                          "type": "string",
                          "example": "Алексей",
                          "description": "имя контрагента"
                        },
                        "last_name": {
                          "type": "string",
                          "example": "Петров",
                          "description": "фамилия контрагента"
                        },
                        "middle_name": {
                          "type": "string",
                          "example": "Викторович",
                          "description": "отчество контрагента"
                        },
                        "birthday": {
                          "type": "string",
                          "format": "date",
                          "example": "1980-04-02",
                          "description": "дата рождения"
                        },
                        "address": {
                          "type": "string",
                          "example": "630073, Новосибирская область, город Новосибирск, Новогодняя ул., д. 20/1, кв. 26",
                          "description": "адрес"
                        },
                        "phone_1": {
                          "type": "string",
                          "example": "79999999990",
                          "description": "основной номер телефона"
                        },
                        "phone_2": {
                          "type": "string",
                          "example": "78888888888",
                          "description": "дополнительный номер телефона"
                        },
                        "email": {
                          "type": "string",
                          "example": "support@itecho.ru",
                          "description": "электронная почта"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-03-22T14:01:37.000000Z",
                          "description": "дата создания"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-03-23T10:48:33.000000Z",
                          "description": "дата последнего обновления"
                        },
                        "access_token": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "string",
                              "example": "2|k8InFzsVIDB3sumslYax1hWJcZDglKptEgIWzxWo21bdb3d6",
                              "description": "Bearer token для авторизации в системе"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Авторизация/#login"
        },
        "description": "#### Параметры запроса - `phone` — номер телефона контрагента - `password` — последние 4 цифры номера телефона, с которого был совершён звонок-сброс (в примере ниже — условный `1111`)",
        "x-used-in": [
          "17.1"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string",
                    "example": "79999999990",
                    "description": "номер телефона контрагента"
                  },
                  "password": {
                    "type": "string",
                    "example": "1111",
                    "description": "последние 4 цифры номера телефона, с которого был совершён звонок-сброс (в примере ниже — условный 1111)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/counterparty/miniapps/{provider}/contact_auth": {
      "post": {
        "summary": "Авторизация miniapp по подписанному контакту",
        "operationId": "miniapp-contact-auth",
        "tags": [
          "E-Commerce / Авторизация"
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparty": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "phone_1": {
                          "type": "string",
                          "example": "79139277802"
                        },
                        "access_token": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "string",
                              "example": "2|k8InFzsVIDB3sumslYax1hWJcZDglKptEgIWzxWo21bdb3d6"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Авторизация/#miniapp-contact-auth"
        },
        "description": "Используется, когда miniapp уже получил у провайдера подтверждённый контакт клиента и должен получить обычный `counterparty.access_token.value` для E-Commerce API. Канонический маршрут находится в counterparty-контуре. Не используйте публичные alias URL вида `/api/miniapps/.../auth/...`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "phone": {
                    "type": "string",
                    "example": "+79139277802",
                    "description": "телефон из подписанного contact payload. Можно передать в формате +79139277802, в базе он сохранится как 79139277802."
                  },
                  "auth_date": {
                    "type": "integer",
                    "example": 1780000000,
                    "description": "Unix timestamp подписи."
                  },
                  "hash": {
                    "type": "string",
                    "example": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
                    "description": "подпись contact payload, 64 hex-символа."
                  },
                  "init_data": {
                    "type": "string",
                    "example": "auth_date=1780000000&user=%7B%22id%22%3A123456%7D&hash=...",
                    "description": "подписанные init data miniapp."
                  },
                  "device": {
                    "type": "string",
                    "example": "max-miniapp",
                    "description": "имя устройства для Sanctum token, например max-miniapp."
                  }
                },
                "required": [
                  "phone",
                  "auth_date",
                  "hash",
                  "init_data",
                  "device"
                ]
              }
            }
          }
        }
      }
    },
    "/api/counterparty/logout": {
      "post": {
        "summary": "Выход контрагента из системы",
        "operationId": "logout",
        "tags": [
          "E-Commerce / Авторизация"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "User successfully logout from all devices"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Авторизация/#logout"
        },
        "description": "#### Параметры запроса - `from_all_devices` — признак выхода со всех устройств (boolean)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from_all_devices": {
                    "type": "boolean",
                    "example": true,
                    "description": "признак выхода со всех устройств (boolean)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/counterparty/callback_auth/init": {
      "post": {
        "summary": "Инициализация авторизации по callback (звонок)",
        "operationId": "callback-auth-init",
        "tags": [
          "E-Commerce / Авторизация"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Авторизация/#callback-auth-init"
        },
        "description": "Запускает звонок на номер телефона контрагента для авторизации по callback."
      }
    },
    "/api/counterparty/callback_auth/status": {
      "post": {
        "summary": "Проверка статуса callback-авторизации",
        "operationId": "callback-auth-status",
        "tags": [
          "E-Commerce / Авторизация"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Авторизация/#callback-auth-status"
        },
        "description": "Проверяет, завершён ли callback-звонок, и возвращает access_token если авторизация прошла успешно."
      }
    },
    "/api/counterparty/tags": {
      "get": {
        "summary": "Получение списка популярных тегов",
        "operationId": "popular-tags",
        "tags": [
          "E-Commerce / Вспомогательные запросы"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Новинка",
                            "description": "название тега"
                          },
                          "photo": {
                            "type": "string",
                            "nullable": true
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-04-10T07:03:08.000000Z",
                            "description": "дата/время добавления в систему"
                          }
                        }
                      }
                    },
                    "tagsCount": {
                      "type": "integer",
                      "example": 2,
                      "description": "общее количество тегов"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Вспомогательные запросы/#popular-tags"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      }
    },
    "/api/counterparty/search/popular": {
      "get": {
        "summary": "Получение списка популярных поисковых запросов",
        "operationId": "popular-search",
        "tags": [
          "E-Commerce / Вспомогательные запросы"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "popularRequests": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 126,
                            "description": "первичный ключ"
                          },
                          "value": {
                            "type": "string",
                            "example": "сыворотка",
                            "description": "текст поискового запроса"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2025-06-23T17:50:42.000000Z",
                            "description": "дата/время добавления в систему"
                          }
                        }
                      }
                    },
                    "popularRequestsCount": {
                      "type": "integer",
                      "example": 2,
                      "description": "общее количество популярных запросов"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Вспомогательные запросы/#popular-search"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      }
    },
    "/api/counterparty/search/history": {
      "get": {
        "summary": "Получение истории поисковых запросов",
        "operationId": "search-history",
        "tags": [
          "E-Commerce / Вспомогательные запросы"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/LaravelPaginator"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "первичный ключ"
                              },
                              "value": {
                                "type": "string",
                                "example": "тональный крем",
                                "description": "текст поискового запроса"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-06-23T17:50:42.000000Z",
                                "description": "дата/время добавления в систему"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Вспомогательные запросы/#search-history"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      }
    },
    "/api/counterparty/blocks/{code}": {
      "get": {
        "summary": "Получение выбранного блока (по полю code)",
        "operationId": "get-block-by-code",
        "tags": [
          "E-Commerce / Динамический контент"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "block": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 42,
                          "description": "ID"
                        },
                        "code": {
                          "type": "integer",
                          "example": 9,
                          "description": "код"
                        },
                        "name": {
                          "type": "string",
                          "example": "Картинка",
                          "description": "название блока"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3173,
                              "description": "ID"
                            },
                            "name": {
                              "type": "string",
                              "example": "Variant6.png",
                              "description": "название блока"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 2,
                                  "description": "ID"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Аватар",
                                  "description": "название блока"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "description": "URL ссылка на аватар элемента меню"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/NkuY5AlCIqKraGSjxvi8ZgjbHOzMPSk8opUZ7CMq.png"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-03-13T08:00:53.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-03-13T08:00:53.000000Z"
                            }
                          },
                          "description": "URL ссылка на аватар элемента меню"
                        },
                        "block_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3,
                              "description": "ID"
                            },
                            "name": {
                              "type": "string",
                              "example": "Картинка",
                              "description": "название блока"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/image-profile-2.svg",
                              "description": "URL ссылка на аватар элемента меню"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-01-23T09:47:38.000000Z"
                            }
                          },
                          "description": "объект с информацией о типе блока"
                        },
                        "link": {
                          "type": "string",
                          "nullable": true
                        },
                        "file": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3172,
                              "description": "ID"
                            },
                            "name": {
                              "type": "string",
                              "example": "Variant6.png",
                              "description": "название блока"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "ID"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор",
                                  "description": "название блока"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "description": "URL ссылка на аватар элемента меню"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/hyYYah60RQfaL8oCSfHx0Ad3zknA39Wg8mgBMIVN.png"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-03-13T08:00:52.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-03-13T08:00:52.000000Z"
                            }
                          },
                          "description": "объект с информацией о загруженном файле"
                        },
                        "text": {
                          "type": "string",
                          "nullable": true
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 39,
                              "description": "ID"
                            },
                            "name": {
                              "type": "string",
                              "example": "Слайдер 2",
                              "description": "название блока"
                            }
                          },
                          "description": "родительский блок"
                        },
                        "children": {
                          "type": "array",
                          "items": {}
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2025-03-13T08:00:53.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Динамический контент/#get-block-by-code"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      }
    },
    "/api/counterparty/blocks/id/{identifier}": {
      "get": {
        "summary": "Получение выбранного блока (по полю identifier)",
        "operationId": "get-block-by-identifier",
        "tags": [
          "E-Commerce / Динамический контент"
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "block": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 42,
                          "description": "ID"
                        },
                        "code": {
                          "type": "integer",
                          "example": 9,
                          "description": "код"
                        },
                        "name": {
                          "type": "string",
                          "example": "Картинка",
                          "description": "название блока"
                        },
                        "identifier": {
                          "type": "string",
                          "example": "header",
                          "description": "идентификатор"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3173,
                              "description": "ID"
                            },
                            "name": {
                              "type": "string",
                              "example": "Variant6.png",
                              "description": "название блока"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 2,
                                  "description": "ID"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Аватар",
                                  "description": "название блока"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "description": "URL ссылка на аватар элемента меню"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/NkuY5AlCIqKraGSjxvi8ZgjbHOzMPSk8opUZ7CMq.png"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-03-13T08:00:53.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-03-13T08:00:53.000000Z"
                            }
                          },
                          "description": "URL ссылка на аватар элемента меню"
                        },
                        "block_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3,
                              "description": "ID"
                            },
                            "name": {
                              "type": "string",
                              "example": "Картинка",
                              "description": "название блока"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/image-profile-2.svg",
                              "description": "URL ссылка на аватар элемента меню"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-01-23T09:47:38.000000Z"
                            }
                          },
                          "description": "объект с информацией о типе блока"
                        },
                        "link": {
                          "type": "string",
                          "nullable": true
                        },
                        "file": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3172,
                              "description": "ID"
                            },
                            "name": {
                              "type": "string",
                              "example": "Variant6.png",
                              "description": "название блока"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "ID"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор",
                                  "description": "название блока"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "description": "URL ссылка на аватар элемента меню"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/hyYYah60RQfaL8oCSfHx0Ad3zknA39Wg8mgBMIVN.png"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-03-13T08:00:52.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-03-13T08:00:52.000000Z"
                            }
                          },
                          "description": "объект с информацией о загруженном файле"
                        },
                        "text": {
                          "type": "string",
                          "nullable": true
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 39,
                              "description": "ID"
                            },
                            "name": {
                              "type": "string",
                              "example": "Слайдер 2",
                              "description": "название блока"
                            }
                          },
                          "description": "родительский блок"
                        },
                        "children": {
                          "type": "array",
                          "items": {}
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2025-03-13T08:00:53.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Динамический контент/#get-block-by-identifier"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      }
    },
    "/api/counterparty/orders/precalculate": {
      "post": {
        "summary": "Предварительный расчёт стоимости заказа",
        "operationId": "orders-precalculate",
        "tags": [
          "E-Commerce / Заказы"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price": {
                      "type": "number",
                      "example": 1952.4,
                      "description": "общая стоимость заказа (в руб.)"
                    },
                    "discount": {
                      "type": "number",
                      "example": 195.24,
                      "description": "скидка (выгода) при оформлении заказа (в руб.)"
                    },
                    "total": {
                      "type": "number",
                      "example": 1757.16,
                      "description": "сумма к оплате (в руб.)"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Заказы/#orders-precalculate"
        },
        "description": "#### Параметры запроса - `products` — массив выбранных товаров - `products.id` — ID выбранного товара - `products.quantity` — кол-во единиц выбранного товара",
        "x-used-in": [
          "17.1"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "products": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 28504,
                          "description": "ID выбранного товара"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 3,
                          "description": "кол-во единиц выбранного товара"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/counterparty/orders": {
      "get": {
        "summary": "Получение списка заказов",
        "operationId": "orders-list",
        "tags": [
          "E-Commerce / Заказы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orders": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ заказа"
                          },
                          "status": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "первичный ключ заказа"
                              },
                              "name": {
                                "type": "string",
                                "example": "В сборке"
                              },
                              "photo": {
                                "type": "string",
                                "nullable": true
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-03-27T07:00:46.000000Z",
                                "description": "дата и время создания заказа"
                              }
                            },
                            "description": "объект с информацией о текущем статусе заказа"
                          },
                          "price": {
                            "type": "string",
                            "format": "decimal",
                            "example": "4900.00",
                            "description": "сумма к оплате"
                          },
                          "delivery_type": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "первичный ключ заказа"
                              },
                              "name": {
                                "type": "string",
                                "example": "Самовывоз"
                              },
                              "price": {
                                "type": "string",
                                "format": "decimal",
                                "example": "0.00",
                                "description": "сумма к оплате"
                              },
                              "is_active": {
                                "type": "integer",
                                "example": 1
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-05-13T05:26:37.000000Z",
                                "description": "дата и время создания заказа"
                              }
                            },
                            "description": "объект с информацией о способе доставки"
                          },
                          "shop": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "первичный ключ заказа"
                              },
                              "photo": {
                                "type": "string",
                                "nullable": true
                              },
                              "name": {
                                "type": "string",
                                "example": "Центральный"
                              },
                              "address": {
                                "type": "string",
                                "example": "г. Донецк, ул. Ленина, 1"
                              },
                              "phone": {
                                "type": "string",
                                "example": "+79851234567"
                              },
                              "schedule": {
                                "type": "string",
                                "example": "ПН-ПТ, с 10:00 до 18:00"
                              }
                            },
                            "description": "объект с информацией о выбранном магазине (если способ доставки не «Самовывоз», поле равно null)"
                          },
                          "products": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "первичный ключ заказа"
                                },
                                "old_price": {
                                  "type": "string",
                                  "nullable": true
                                },
                                "price": {
                                  "type": "string",
                                  "format": "decimal",
                                  "example": "2450.00",
                                  "description": "сумма к оплате"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "BANILA CO Glow Fit Foundation Brush"
                                },
                                "photos": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "integer",
                                        "example": 14,
                                        "description": "первичный ключ заказа"
                                      },
                                      "name": {
                                        "type": "string",
                                        "example": "full_covericious_glow_fit_foundation_spf25_pa__23_peanut.jpg"
                                      },
                                      "path": {
                                        "type": "string",
                                        "format": "uri",
                                        "example": "https://beta.back.erp.itecho.ru/storage/uploads/full_covericious_glow_fit_foundation_spf25_pa__23_peanut.jpg"
                                      }
                                    }
                                  }
                                },
                                "quantity": {
                                  "type": "integer",
                                  "example": 2
                                }
                              }
                            }
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-05-13T05:29:39.000000Z",
                            "description": "дата и время создания заказа"
                          }
                        }
                      }
                    },
                    "ordersCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "общее количество заказов"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Заказы/#orders-list"
        },
        "description": "#### Параметры запроса Список передаваемых параметров отсутствует."
      },
      "post": {
        "summary": "Создание заказа",
        "operationId": "create-order",
        "tags": [
          "E-Commerce / Заказы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 169,
                          "description": "ID выбранного товара"
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 4,
                              "description": "ID выбранного товара"
                            },
                            "name": {
                              "type": "string",
                              "example": "Можно забирать"
                            },
                            "photo": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-27T07:00:46.000000Z",
                              "description": "дата/время заказа"
                            }
                          },
                          "description": "этап работ (icon — фото, value — название)"
                        },
                        "price": {
                          "type": "string",
                          "format": "decimal",
                          "example": "760.00",
                          "description": "стоимость заказа"
                        },
                        "delivery_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2,
                              "description": "ID выбранного товара"
                            },
                            "name": {
                              "type": "string",
                              "example": "Доставка транспортной компанией СДЭК"
                            },
                            "price": {
                              "type": "string",
                              "format": "decimal",
                              "example": "300.00",
                              "description": "стоимость заказа"
                            },
                            "is_active": {
                              "type": "integer",
                              "example": 1
                            }
                          },
                          "description": "метод доставки"
                        },
                        "delivery_subtype": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2,
                              "description": "ID выбранного товара"
                            },
                            "name": {
                              "type": "string",
                              "example": "Курьер"
                            },
                            "price": {
                              "type": "string",
                              "format": "decimal",
                              "example": "1000.00",
                              "description": "стоимость заказа"
                            },
                            "is_active": {
                              "type": "integer",
                              "example": 1
                            }
                          },
                          "description": "подтип доставки"
                        },
                        "delivery_subtype_param": {
                          "type": "string",
                          "nullable": true
                        },
                        "payment_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID выбранного товара"
                            },
                            "photo": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/pay.svg"
                            },
                            "name": {
                              "type": "string",
                              "example": "При получении"
                            },
                            "description": {
                              "type": "string",
                              "example": "Оплата наличными или картой при получении."
                            }
                          },
                          "description": "тип оплаты"
                        },
                        "shop": {
                          "type": "string",
                          "nullable": true
                        },
                        "address": {
                          "type": "string",
                          "example": "115477, г Москва, р-н Царицыно, ул Деловая, д 20",
                          "description": "адрес курьерской доставки. Используйте значение value. Применяется для delivery_subtype_id = 2 (Курьерская доставка)"
                        },
                        "products": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 30525,
                                "description": "ID выбранного товара"
                              },
                              "old_price": {
                                "type": "string",
                                "nullable": true
                              },
                              "price": {
                                "type": "string",
                                "format": "decimal",
                                "example": "760.00",
                                "description": "стоимость заказа"
                              },
                              "name": {
                                "type": "string",
                                "example": "Мясной салат 210г"
                              },
                              "photos": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "integer",
                                      "example": 3253,
                                      "description": "ID выбранного товара"
                                    },
                                    "name": {
                                      "type": "string",
                                      "example": "XXL_height (1).jpg"
                                    },
                                    "path": {
                                      "type": "string",
                                      "format": "uri",
                                      "example": "https://api.gigma.ru/storage/uploads/y88lMgVYhP8fhp90va2BEDjsnlXGIVDJcGKzgm3i.jpg"
                                    },
                                    "link": {
                                      "type": "string",
                                      "nullable": true
                                    }
                                  }
                                }
                              },
                              "quantity": {
                                "type": "integer",
                                "example": 1,
                                "description": "кол-во единиц выбранного товара"
                              }
                            }
                          }
                        },
                        "payment_link": {
                          "type": "string",
                          "nullable": true
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2025-05-29T09:17:51.000000Z",
                          "description": "дата/время заказа"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Заказы/#create-order"
        },
        "description": "#### Параметры запроса - `delivery_type_id` — ID способа доставки - `delivery_subtype_id` — ID подкатегорий доставки. Применяется для `delivery_type_id`, отличных от id = 1 (Самовывоза) - `delivery_subtype_param_id` — ID параметра подкатегории доставки. Применяется для `delivery_subtype_id`, отличных от id = 2 (Курьерская доставка) - `payment_type_id` — ID выбранного способа оплаты - `shop_id` — ID выбранного магазина (пункта выдачи) - `address` — адрес курьерской доставки. Используйте значение `value`. Применяется для `delivery_subtype_id` = 2 (Курьерская доставка) - `products` — массив выбра",
        "x-used-in": [
          "17.1"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "delivery_type_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "Способ доставки. Подтипы — /api/delivery_types/{id}/subtypes Получить актуальные значения: `GET /api/delivery_types`"
                  },
                  "delivery_subtype_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "ID подкатегорий доставки. Применяется для delivery_type_id, отличных от id = 1 (Самовывоза)"
                  },
                  "payment_type_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "Способ оплаты Получить актуальные значения: `GET /api/payment_types`"
                  },
                  "address": {
                    "type": "string",
                    "example": "115477, г Москва, р-н Царицыно, ул Деловая, д 20",
                    "description": "адрес курьерской доставки. Используйте значение value. Применяется для delivery_subtype_id = 2 (Курьерская доставка)"
                  },
                  "products": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "ID выбранного товара"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 2,
                          "description": "кол-во единиц выбранного товара"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/counterparty/orders/{id}": {
      "get": {
        "summary": "Получение выбранного заказа",
        "operationId": "get-order",
        "tags": [
          "E-Commerce / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 169,
                          "description": "ID товара"
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 4,
                              "description": "ID товара"
                            },
                            "name": {
                              "type": "string",
                              "example": "Можно забирать",
                              "description": "имя покупателя в заказе"
                            },
                            "photo": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-27T07:00:46.000000Z",
                              "description": "дата и время создания заказа"
                            }
                          },
                          "description": "объект с информацией о текущем статусе заказа"
                        },
                        "price": {
                          "type": "string",
                          "format": "decimal",
                          "example": "760.00",
                          "description": "текущая цена"
                        },
                        "delivery_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2,
                              "description": "ID товара"
                            },
                            "name": {
                              "type": "string",
                              "example": "Доставка транспортной компанией СДЭК",
                              "description": "имя покупателя в заказе"
                            },
                            "price": {
                              "type": "string",
                              "format": "decimal",
                              "example": "300.00",
                              "description": "текущая цена"
                            },
                            "is_active": {
                              "type": "integer",
                              "example": 1,
                              "description": "флаг активности"
                            }
                          },
                          "description": "объект с информацией о способе доставки"
                        },
                        "delivery_subtype": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2,
                              "description": "ID товара"
                            },
                            "name": {
                              "type": "string",
                              "example": "Курьер",
                              "description": "имя покупателя в заказе"
                            },
                            "price": {
                              "type": "string",
                              "format": "decimal",
                              "example": "1000.00",
                              "description": "текущая цена"
                            },
                            "is_active": {
                              "type": "integer",
                              "example": 1,
                              "description": "флаг активности"
                            }
                          },
                          "description": "объект с информацией о подтипе доставки (например, «Курьер» или «ПВЗ»)"
                        },
                        "delivery_subtype_param": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID товара"
                            },
                            "name": {
                              "type": "string",
                              "example": "г. Донецк, ул.Кручатова 1, пн-пт 10:00-18:00, сб 10:00-16:00, вс выходной",
                              "description": "имя покупателя в заказе"
                            }
                          },
                          "description": "объект с параметрами подтипа доставки (например, адрес ПВЗ)"
                        },
                        "payment_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID товара"
                            },
                            "photo": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/pay.svg",
                              "description": "ссылка на фото магазина"
                            },
                            "name": {
                              "type": "string",
                              "example": "При получении",
                              "description": "имя покупателя в заказе"
                            },
                            "description": {
                              "type": "string",
                              "example": "Оплата наличными или картой при получении.",
                              "description": "описание"
                            }
                          },
                          "description": "объект с информацией о способе оплаты"
                        },
                        "address": {
                          "type": "string",
                          "example": "115477, г Москва, р-н Царицыно, ул Деловая, д 20",
                          "description": "адрес магазина"
                        },
                        "shop": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 19,
                              "description": "ID товара"
                            },
                            "photo": {
                              "type": "string",
                              "nullable": true
                            },
                            "name": {
                              "type": "string",
                              "example": "Косметика",
                              "description": "имя покупателя в заказе"
                            },
                            "address": {
                              "type": "string",
                              "example": "283011, Донецкая Народная респ, г Донецк, пр-кт Ленина, д 1",
                              "description": "адрес магазина"
                            },
                            "latitude": {
                              "type": "string",
                              "format": "decimal",
                              "example": "47.9763030",
                              "description": "широта"
                            },
                            "longitude": {
                              "type": "string",
                              "format": "decimal",
                              "example": "37.7035440",
                              "description": "долгота"
                            },
                            "phone": {
                              "type": "string",
                              "example": "78001414141",
                              "description": "телефон"
                            },
                            "schedule": {
                              "type": "string",
                              "nullable": true
                            }
                          },
                          "description": "объект с информацией о магазине (если применимо)"
                        },
                        "products": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 30525,
                                "description": "ID товара"
                              },
                              "old_price": {
                                "type": "string",
                                "nullable": true
                              },
                              "price": {
                                "type": "string",
                                "format": "decimal",
                                "example": "760.00",
                                "description": "текущая цена"
                              },
                              "name": {
                                "type": "string",
                                "example": "Мясной салат 210г",
                                "description": "имя покупателя в заказе"
                              },
                              "photos": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "integer",
                                      "example": 3253,
                                      "description": "ID товара"
                                    },
                                    "name": {
                                      "type": "string",
                                      "example": "XXL_height (1).jpg",
                                      "description": "имя покупателя в заказе"
                                    },
                                    "path": {
                                      "type": "string",
                                      "format": "uri",
                                      "example": "https://api.gigma.ru/storage/uploads/y88lMgVYhP8fhp90va2BEDjsnlXGIVDJcGKzgm3i.jpg"
                                    },
                                    "link": {
                                      "type": "string",
                                      "nullable": true
                                    }
                                  }
                                }
                              },
                              "quantity": {
                                "type": "integer",
                                "example": 1,
                                "description": "количество товара в заказе"
                              }
                            }
                          }
                        },
                        "payment_link": {
                          "type": "string",
                          "nullable": true
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2025-05-29T09:17:51.000000Z",
                          "description": "дата и время создания заказа"
                        }
                      },
                      "description": "объект с информацией о заказе"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Заказы/#get-order"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют.",
        "x-used-in": [
          "17.1"
        ]
      }
    },
    "/api/counterparty/subscriptions": {
      "get": {
        "summary": "Получение списка подписок",
        "operationId": "subscriptions-list",
        "tags": [
          "E-Commerce / Заказы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Заказы/#subscriptions-list"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с массивом подписок контрагента."
      },
      "post": {
        "summary": "Создание подписки",
        "operationId": "subscription-create",
        "tags": [
          "E-Commerce / Заказы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Заказы/#subscription-create"
        },
        "description": "#### Параметры запроса - `nomenclature_id` *(int, обязательно)* — ID позиции номенклатуры (с `is_subscription = true`)"
      }
    },
    "/api/counterparty/subscriptions/{id}/checkout": {
      "get": {
        "summary": "Оформление (checkout) подписки",
        "operationId": "subscription-checkout",
        "tags": [
          "E-Commerce / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Заказы/#subscription-checkout"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с URL для оплаты подписки."
      }
    },
    "/api/counterparty/subscriptions/{id}": {
      "put": {
        "summary": "Обновление подписки",
        "operationId": "subscription-update",
        "tags": [
          "E-Commerce / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Заказы/#subscription-update"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/counterparty/subscriptions/{id}/cancel": {
      "post": {
        "summary": "Отмена подписки",
        "operationId": "subscription-cancel",
        "tags": [
          "E-Commerce / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Заказы/#subscription-cancel"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/counterparty/subscriptions/{id}/resume": {
      "post": {
        "summary": "Возобновление подписки",
        "operationId": "subscription-resume",
        "tags": [
          "E-Commerce / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Заказы/#subscription-resume"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/counterparty/subscriptions/{id}/payments": {
      "get": {
        "summary": "Получение платежей по подписке",
        "operationId": "subscription-payments",
        "tags": [
          "E-Commerce / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Заказы/#subscription-payments"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с историей платежей по подписке."
      }
    },
    "/api/counterparty/subscriptions/{id}/retry-payment": {
      "post": {
        "summary": "Повторная попытка оплаты подписки",
        "operationId": "subscription-retry-payment",
        "tags": [
          "E-Commerce / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Заказы/#subscription-retry-payment"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/counterparty": {
      "get": {
        "summary": "Получение текущего контрагента (клиента)",
        "operationId": "get-counterparty",
        "tags": [
          "E-Commerce / Контрагент (клиент)"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparty": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "идентификатор менеджера"
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2,
                              "description": "идентификатор менеджера"
                            },
                            "name": {
                              "type": "string",
                              "example": "Розница",
                              "description": "полное имя менеджера"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-23T10:27:06.000000Z",
                              "description": "дата создания"
                            }
                          },
                          "description": "объект с информацией о типе контрагента"
                        },
                        "manager": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "идентификатор менеджера"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Артём",
                              "description": "имя контрагента"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Полищук",
                              "description": "фамилия контрагента"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Николаевич",
                              "description": "отчество контрагента"
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём",
                              "description": "полное имя менеджера"
                            }
                          },
                          "description": "объект с информацией о менеджере"
                        },
                        "avatar": {
                          "type": "string",
                          "nullable": true
                        },
                        "first_name": {
                          "type": "string",
                          "example": "Алексей",
                          "description": "имя контрагента"
                        },
                        "last_name": {
                          "type": "string",
                          "example": "Петров",
                          "description": "фамилия контрагента"
                        },
                        "middle_name": {
                          "type": "string",
                          "example": "Викторович",
                          "description": "отчество контрагента"
                        },
                        "birthday": {
                          "type": "string",
                          "format": "date",
                          "example": "1980-04-02",
                          "description": "дата рождения"
                        },
                        "address": {
                          "type": "string",
                          "example": "630073, Новосибирская область, город Новосибирск, Новогодняя ул., д. 20/1, кв. 26",
                          "description": "адрес"
                        },
                        "phone_1": {
                          "type": "string",
                          "example": "79999999990",
                          "description": "основной номер телефона"
                        },
                        "phone_2": {
                          "type": "string",
                          "example": "78888888888",
                          "description": "дополнительный номер телефона"
                        },
                        "email": {
                          "type": "string",
                          "example": "support@itecho.ru",
                          "description": "электронная почта"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-03-22T14:01:37.000000Z",
                          "description": "дата создания"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-03-23T10:48:33.000000Z",
                          "description": "дата последнего обновления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Контрагент (клиент)/#get-counterparty"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      },
      "put": {
        "summary": "Обновление данных текущего контрагента (клиента)",
        "operationId": "update-counterparty",
        "tags": [
          "E-Commerce / Контрагент (клиент)"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparty": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 14
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Заказчик"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-27T07:00:46.000000Z"
                            }
                          }
                        },
                        "manager": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Артём",
                              "description": "имя (может быть пустым, нулевым или NULL)"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Полищук",
                              "description": "фамилия (может быть пустым, нулевым или NULL)"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Николаевич"
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём"
                            }
                          }
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 17
                            },
                            "name": {
                              "type": "string",
                              "example": "Чек.png"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Аватар"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/dGOPVMjBgjlb3CQjaU7G0HK6Z4q1aATVzfgbGGhM.png"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-05-14T11:44:21.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-05-14T11:44:21.000000Z"
                            }
                          }
                        },
                        "first_name": {
                          "type": "string",
                          "example": "Алексей",
                          "description": "имя (может быть пустым, нулевым или NULL)"
                        },
                        "last_name": {
                          "type": "string",
                          "example": "Петров",
                          "description": "фамилия (может быть пустым, нулевым или NULL)"
                        },
                        "middle_name": {
                          "type": "string",
                          "nullable": true
                        },
                        "birthday": {
                          "type": "string",
                          "nullable": true
                        },
                        "address": {
                          "type": "string",
                          "nullable": true
                        },
                        "phone_1": {
                          "type": "string",
                          "example": "79498102351"
                        },
                        "phone_2": {
                          "type": "string",
                          "nullable": true
                        },
                        "email": {
                          "type": "string",
                          "example": "test@mail.ru",
                          "description": "email (может быть пустым, нулевым или NULL)"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-04-01T08:01:53.000000Z"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-05-14T11:44:39.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Контрагент (клиент)/#update-counterparty"
        },
        "description": "#### Параметры запроса - `avatar_id` — ID аватара, загруженного при помощи запроса (может быть пустым, нулевым или NULL) - `first_name` — имя (может быть пустым, нулевым или NULL) - `last_name` — фамилия (может быть пустым, нулевым или NULL) - `email` — email (может быть пустым, нулевым или NULL) - `address` — адрес клиента из Dadata (может быть пустым, нулевым или NULL) **Примечание:** поле `phone` является константным.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "avatar_id": {
                    "type": "integer",
                    "example": 17,
                    "description": "ID аватара, загруженного при помощи запроса (может быть пустым, нулевым или NULL)"
                  },
                  "first_name": {
                    "type": "string",
                    "example": "Алексей",
                    "description": "имя (может быть пустым, нулевым или NULL)"
                  },
                  "last_name": {
                    "type": "string",
                    "example": "Петров",
                    "description": "фамилия (может быть пустым, нулевым или NULL)"
                  },
                  "email": {
                    "type": "string",
                    "example": "test@mail.ru",
                    "description": "email (может быть пустым, нулевым или NULL)"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление текущего контрагента (клиента)",
        "operationId": "delete-counterparty",
        "tags": [
          "E-Commerce / Контрагент (клиент)"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Контрагент (клиент)/#delete-counterparty"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      }
    },
    "/api/counterparty/phone/request_change": {
      "post": {
        "summary": "Запрос на смену номера телефона",
        "operationId": "phone-request-change",
        "tags": [
          "E-Commerce / Контрагент (клиент)"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Контрагент (клиент)/#phone-request-change"
        },
        "description": "Инициирует звонок-сброс на новый номер телефона для подтверждения смены."
      }
    },
    "/api/counterparty/phone/verify_change": {
      "post": {
        "summary": "Подтверждение смены номера телефона",
        "operationId": "phone-verify-change",
        "tags": [
          "E-Commerce / Контрагент (клиент)"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Контрагент (клиент)/#phone-verify-change"
        },
        "description": "Подтверждает смену номера телефона после получения кода из звонка-сброса."
      }
    },
    "/api/counterparty/menus/{slug?}": {
      "get": {
        "summary": "Получение элементов навигационной панели",
        "operationId": "get-menu",
        "tags": [
          "E-Commerce / Навигационная панель"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "menuItems": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer",
                          "example": 1,
                          "description": "ID пункта меню"
                        },
                        "avatar": {
                          "type": "string",
                          "format": "uri",
                          "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg",
                          "description": "URL аватара элемента меню (иконка)"
                        },
                        "name": {
                          "type": "string",
                          "example": "Главное меню",
                          "description": "название пункта меню"
                        },
                        "url": {
                          "type": "string",
                          "example": "shoes",
                          "description": "ссылка для перехода и/или загрузки HTML содержимого страницы"
                        },
                        "children": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "integer",
                                "example": 2,
                                "description": "ID пункта меню"
                              },
                              "avatar": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://api.gigma.ru/storage/uploads/lARkQYrNNSgcoz5mkE94pGINQmQ1QHzwauuSAyYS.jpg",
                                "description": "URL аватара элемента меню (иконка)"
                              },
                              "name": {
                                "type": "string",
                                "example": "Избранное",
                                "description": "название пункта меню"
                              },
                              "url": {
                                "type": "string",
                                "example": "/new-item2",
                                "description": "ссылка для перехода и/или загрузки HTML содержимого страницы"
                              },
                              "children": {
                                "type": "array",
                                "items": {}
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Навигационная панель/#get-menu"
        },
        "description": "#### Параметры пути - `{slug?}` *(опционально)* — slug меню. Если не указан, возвращается меню по умолчанию."
      }
    },
    "/api/counterparty/prices": {
      "get": {
        "summary": "Получение списка цен",
        "operationId": "prices",
        "tags": [
          "E-Commerce / Справочники"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "min_price": {
                      "type": "integer",
                      "example": 1,
                      "description": "минимальная цена"
                    },
                    "max_price": {
                      "type": "integer",
                      "example": 10000,
                      "description": "максимальная цена"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Справочники/#prices"
        },
        "description": "#### Параметры запроса - `query` — опциональный параметр, используемый для поиска товаров по названию - `country_id[]` — массив опциональных параметров для фильтрации товаров по ID страны - `category_id[]` — массив опциональных параметров для фильтрации товаров по ID категории - `brand_id[]` — массив опциональных параметров для фильтрации товаров по ID бренда - `order_by` — сортировка по: `price_asc`, `price_desc`, `popularity_asc`, `popularity_desc` - `available` — наличие: `online` или `offline` - `sale` — `true` для товаров со скидками, `false` для всех товаров - `price_from` — минимальная "
      }
    },
    "/api/counterparty/categories": {
      "get": {
        "summary": "Получение списка категорий",
        "operationId": "categories",
        "tags": [
          "E-Commerce / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "categories": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 2,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Для макияжа",
                            "description": "название категории"
                          },
                          "photo": {
                            "type": "string",
                            "format": "uri",
                            "example": "https://beta.back.erp.itecho.ru//storage/uploads/default.jpg",
                            "description": "ссылка на фото категории"
                          },
                          "parent": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "первичный ключ"
                              },
                              "name": {
                                "type": "string",
                                "example": "Аксессуары",
                                "description": "название категории"
                              },
                              "photo": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://beta.back.erp.itecho.ru//storage/uploads/default.jpg",
                                "description": "ссылка на фото категории"
                              },
                              "parent": {
                                "type": "string",
                                "nullable": true
                              }
                            },
                            "description": "объект родительской категории"
                          }
                        }
                      }
                    },
                    "categoriesCount": {
                      "type": "integer",
                      "example": 2
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Справочники/#categories"
        },
        "description": "#### Параметры запроса - `limit` — опциональный параметр для указания ограничения кол-ва возвращаемых значений - `parent_id` — ID родительской категории (для отображения подчиненных элементов)",
        "x-used-in": [
          "17.1"
        ]
      }
    },
    "/api/counterparty/brands": {
      "get": {
        "summary": "Получение списка брендов",
        "operationId": "brands",
        "tags": [
          "E-Commerce / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "brands": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Elizavecca",
                            "description": "название бренда"
                          },
                          "photo": {
                            "type": "string",
                            "format": "uri",
                            "example": "https://beta.back.erp.itecho.ru/storage/uploads/default_brand.png",
                            "description": "ссылка на фото бренда"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-05-02T06:03:54.000000Z",
                            "description": "дата/время добавления в систему"
                          }
                        }
                      }
                    },
                    "brandsCount": {
                      "type": "integer",
                      "example": 2
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Справочники/#brands"
        },
        "description": "#### Параметры запроса - `limit` — опциональный параметр для указания ограничения кол-ва возвращаемых значений"
      }
    },
    "/api/counterparty/countries": {
      "get": {
        "summary": "Получение списка стран",
        "operationId": "countries",
        "tags": [
          "E-Commerce / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "countries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Россия",
                            "description": "название страны"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-04-10T06:59:28.000000Z",
                            "description": "дата/время добавления в систему"
                          }
                        }
                      }
                    },
                    "countriesCount": {
                      "type": "integer",
                      "example": 2
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Справочники/#countries"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      }
    },
    "/api/counterparty/payment_types": {
      "get": {
        "summary": "Получение списка способов оплаты",
        "operationId": "payment-types",
        "tags": [
          "E-Commerce / Справочники"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "paymentTypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "photo": {
                            "type": "string",
                            "format": "uri",
                            "example": "https://beta.back.erp.itecho.ru/storage/uploads/pay.svg",
                            "description": "фото способа оплаты"
                          },
                          "name": {
                            "type": "string",
                            "example": "При получении",
                            "description": "название"
                          },
                          "description": {
                            "type": "string",
                            "example": "Оплата наличными или картой при получении.",
                            "description": "описание"
                          }
                        }
                      }
                    },
                    "paymentTypesCount": {
                      "type": "integer",
                      "example": 2
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Справочники/#payment-types"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      }
    },
    "/api/counterparty/delivery_types": {
      "get": {
        "summary": "Получение списка способов доставки",
        "operationId": "list-delivery-types",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deliveryTypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Самовывоз",
                            "description": "название способа доставки"
                          },
                          "price": {
                            "type": "string",
                            "format": "decimal",
                            "example": "0.00",
                            "description": "стоимость доставки (цена от)"
                          },
                          "is_active": {
                            "type": "integer",
                            "example": 1,
                            "description": "флаг доступности способа доставки для оформления"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-05-13T05:26:37.000000Z",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "deliveryTypesCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-delivery-types"
        },
        "description": "#### Параметры запроса - `query` — поисковая строка"
      }
    },
    "/api/counterparty/delivery_types/{id}/subtypes": {
      "get": {
        "summary": "Получение списка подкатегорий доставки",
        "operationId": "delivery-subtypes",
        "tags": [
          "E-Commerce / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deliverySubtypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Офис транспортной компании СДЭК",
                            "description": "название пункта выдачи"
                          },
                          "price": {
                            "type": "string",
                            "format": "decimal",
                            "example": "300.00"
                          },
                          "is_active": {
                            "type": "integer",
                            "example": 1
                          }
                        }
                      }
                    },
                    "deliverySubtypesCount": {
                      "type": "integer",
                      "example": 2,
                      "description": "общее количество подкатегорий"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Справочники/#delivery-subtypes"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      }
    },
    "/api/counterparty/delivery_types/{id}/subtypes/{id}/params": {
      "get": {
        "summary": "Получение списка параметров подкатегорий доставки",
        "operationId": "delivery-subtype-params",
        "tags": [
          "E-Commerce / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deliverySubtypeParams": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "г. Донецк, ул.Кручатова 1, пн-пт 10:00-18:00, сб 10:00-16:00, вс выходной",
                            "description": "название пункта выдачи"
                          }
                        }
                      }
                    },
                    "deliverySubtypeParamsCount": {
                      "type": "integer",
                      "example": 2,
                      "description": "общее количество параметров подкатегорий"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Справочники/#delivery-subtype-params"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      }
    },
    "/api/counterparty/shops": {
      "get": {
        "summary": "Получение списка магазинов (пунктов выдачи)",
        "operationId": "list-shops",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "shops": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "photo": {
                            "type": "string",
                            "nullable": true
                          },
                          "name": {
                            "type": "string",
                            "example": "Центральный"
                          },
                          "address": {
                            "type": "string",
                            "example": "г. Донецк, ул. Ленина, 1",
                            "description": "адрес магазина"
                          },
                          "phone": {
                            "type": "string",
                            "example": "+79851234567",
                            "description": "контактный номер телефона"
                          },
                          "schedule": {
                            "type": "string",
                            "example": "ПН-ПТ, с 10:00 до 18:00",
                            "description": "график работы магазина"
                          }
                        }
                      }
                    },
                    "shopsCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-shops"
        },
        "description": "#### Параметры запроса - `query` — поисковая строка"
      }
    },
    "/api/counterparty/slides": {
      "get": {
        "summary": "Получение списка рекламных слайдов",
        "operationId": "slides",
        "tags": [
          "E-Commerce / Справочники"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "slides": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "photo": {
                            "type": "string",
                            "format": "uri",
                            "example": "http://localhost:8000/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg",
                            "description": "фото рекламного слайда"
                          },
                          "name": {
                            "type": "string",
                            "example": "Улётное лето",
                            "description": "название"
                          },
                          "description": {
                            "type": "string",
                            "example": "Получите скидку 20% на всё*",
                            "description": "описание"
                          },
                          "link": {
                            "type": "string",
                            "example": "Получите скидку 20% на всё*",
                            "description": "ссылка для перехода (привязать к картинке)"
                          }
                        }
                      }
                    },
                    "slidesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Справочники/#slides"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      }
    },
    "/api/counterparty/search_address": {
      "post": {
        "summary": "Поиск адресов (Dadata)",
        "operationId": "search-address",
        "tags": [
          "E-Commerce / Справочники"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "addresses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "г Москва, ул Деловая, д 20",
                            "description": "краткий формат адреса"
                          },
                          "value": {
                            "type": "string",
                            "example": "115477, г Москва, р-н Царицыно, ул Деловая, д 20",
                            "description": "полный формат адреса"
                          }
                        }
                      }
                    },
                    "addressesCount": {
                      "type": "integer",
                      "example": 5
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Справочники/#search-address"
        },
        "description": "#### Параметры запроса - `query` — поисковый запрос",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "example": "Деловая 20, Москва",
                    "description": "поисковый запрос"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/counterparty/dictionaries": {
      "get": {
        "summary": "Получение списка справочников",
        "operationId": "dictionaries",
        "tags": [
          "E-Commerce / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dictionaries": {
                      "type": "object",
                      "properties": {
                        "categories": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 499,
                                "description": "**(integer)** идентификатор последней записи запроса в группе."
                              },
                              "name": {
                                "type": "string",
                                "example": "Массаж",
                                "description": "**(string)** название тега."
                              },
                              "photo": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://api.gigma.ru/api//storage/uploads/IUSGEJhjX6X6rCmrvf7KjOYTIQ5EVZGo3OwOGYWZ.jpg",
                                "description": "**(string|null)** URL-адрес фотографии тега. null, если нет фото."
                              },
                              "parent": {
                                "type": "string",
                                "nullable": true
                              }
                            }
                          }
                        },
                        "brands": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 119,
                                "description": "**(integer)** идентификатор последней записи запроса в группе."
                              },
                              "name": {
                                "type": "string",
                                "example": "Dream Woman",
                                "description": "**(string)** название тега."
                              },
                              "photo": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://api.gigma.ru/storage/uploads/W9JHUSOzebZHEA7DGInsemlxb2RMMDMZwUF2AslG.webp",
                                "description": "**(string|null)** URL-адрес фотографии тега. null, если нет фото."
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-03-12T07:48:42.000000Z",
                                "description": "**(string)** дата и время создания последней записи в формате ISO 8601."
                              }
                            }
                          }
                        },
                        "countries": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "**(integer)** идентификатор последней записи запроса в группе."
                              },
                              "name": {
                                "type": "string",
                                "example": "Россия",
                                "description": "**(string)** название тега."
                              },
                              "photo": {
                                "type": "string",
                                "nullable": true
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-04-10T06:59:28.000000Z",
                                "description": "**(string)** дата и время создания последней записи в формате ISO 8601."
                              }
                            }
                          }
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 2,
                                "description": "**(integer)** идентификатор последней записи запроса в группе."
                              },
                              "name": {
                                "type": "string",
                                "example": "Аксессуар",
                                "description": "**(string)** название тега."
                              },
                              "photo": {
                                "type": "string",
                                "nullable": true
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-04-10T07:03:08.000000Z",
                                "description": "**(string)** дата и время создания последней записи в формате ISO 8601."
                              }
                            }
                          }
                        },
                        "popular_requests": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 126,
                                "description": "**(integer)** идентификатор последней записи запроса в группе."
                              },
                              "value": {
                                "type": "string",
                                "example": "сыворотка",
                                "description": "**(string)** текст поискового запроса."
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-06-23T17:50:42.000000Z",
                                "description": "**(string)** дата и время создания последней записи в формате ISO 8601."
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Справочники/#dictionaries"
        },
        "description": "#### Параметры запроса - `include` — **опциональный** параметр. Строка, содержащая список справочников, разделенных запятыми, которые необходимо загрузить. - **Доступные значения:** `categories`, `brands`, `countries`, `tags`, `popular_requests` - **По умолчанию:** если параметр не указан, будут загружены все справочники."
      }
    },
    "/api/counterparty/page_types": {
      "get": {
        "summary": "Получение списка типов страниц",
        "operationId": "page-types",
        "tags": [
          "E-Commerce / Страницы"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "идентификатор типа страницы"
                          },
                          "name": {
                            "type": "string",
                            "example": "Страница",
                            "description": "название типа страницы"
                          },
                          "photo": {
                            "type": "string",
                            "nullable": true
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-11-01T19:09:36.000000Z",
                            "description": "дата/время добавления в систему"
                          }
                        }
                      }
                    },
                    "itemsCount": {
                      "type": "integer",
                      "example": 3,
                      "description": "общее количество типов страниц"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Страницы/#page-types"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      }
    },
    "/api/counterparty/pages": {
      "get": {
        "summary": "Получение списка страниц",
        "operationId": "pages-list",
        "tags": [
          "E-Commerce / Страницы"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "идентификатор страницы"
                          },
                          "slug": {
                            "type": "string",
                            "example": "new-1",
                            "description": "URL-идентификатор страницы"
                          },
                          "title": {
                            "type": "string",
                            "example": "Новость 1",
                            "description": "заголовок страницы"
                          },
                          "description": {
                            "type": "string",
                            "example": "Краткое описание новости",
                            "description": "краткое описание страницы"
                          },
                          "preview": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 14,
                                "description": "идентификатор страницы"
                              },
                              "name": {
                                "type": "string",
                                "example": "preview.jpg"
                              },
                              "path": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://api.gigma.ru/storage/uploads/preview.jpg"
                              }
                            },
                            "description": "объект с информацией о превью-изображении"
                          },
                          "content": {
                            "type": "string",
                            "example": "<p>HTML содержимое страницы</p>",
                            "description": "HTML-разметка страницы"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-11-01T19:09:36.000000Z",
                            "description": "дата/время добавления в систему"
                          }
                        }
                      }
                    },
                    "pagesCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "общее количество страниц"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Страницы/#pages-list"
        },
        "description": "#### Параметры запроса - `page_type_id` — обязательный идентификатор типа страницы (берётся из справочника типов страниц)"
      }
    },
    "/api/counterparty/pages/{slug}": {
      "get": {
        "summary": "Получение выбранной страницы",
        "operationId": "get-page",
        "tags": [
          "E-Commerce / Страницы"
        ],
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "page": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "идентификатор страницы"
                        },
                        "slug": {
                          "type": "string",
                          "example": "new-1",
                          "description": "URL-идентификатор страницы"
                        },
                        "title": {
                          "type": "string",
                          "example": "Новость 1",
                          "description": "заголовок страницы"
                        },
                        "description": {
                          "type": "string",
                          "example": "Краткое описание новости",
                          "description": "краткое описание страницы"
                        },
                        "preview": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14,
                              "description": "идентификатор страницы"
                            },
                            "name": {
                              "type": "string",
                              "example": "preview.jpg"
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/preview.jpg"
                            }
                          },
                          "description": "объект с информацией о превью-изображении"
                        },
                        "content": {
                          "type": "string",
                          "example": "<p>HTML содержимое страницы</p>",
                          "description": "HTML-разметка страницы"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-11-01T19:09:36.000000Z",
                          "description": "дата/время добавления в систему"
                        }
                      },
                      "description": "объект страницы (структура аналогична элементу из списка страниц)"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Страницы/#get-page"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      }
    },
    "/api/counterparty/products": {
      "get": {
        "summary": "Получение списка товаров",
        "operationId": "products-list",
        "tags": [
          "E-Commerce / Товары"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "products": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 26896,
                                "description": "первичный ключ (ID товара)"
                              },
                              "views_count": {
                                "type": "integer",
                                "example": 23,
                                "description": "кол-во просмотров"
                              },
                              "photo": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://api.gigma.ru/storage/uploads/7xvG4ZwX4jhjqWwO8Pd11JavGJ2CQ0Z67OUCPWLC.png",
                                "description": "главная фотография товара (одна строка с URL)"
                              },
                              "name": {
                                "type": "string",
                                "example": "Line Repair Nutrient Bio Satin Serum Сыворотка «Био-Сатин», 30 мл",
                                "description": "название товара"
                              },
                              "brand": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 99,
                                    "description": "первичный ключ (ID товара)"
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Бренд 4",
                                    "description": "название товара"
                                  },
                                  "photo": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "example": "2025-01-27T04:19:22.000000Z"
                                  }
                                },
                                "description": "объект с информацией о торговой марке"
                              },
                              "old_price": {
                                "type": "string",
                                "format": "decimal",
                                "example": "2450.00",
                                "description": "старая цена"
                              },
                              "price": {
                                "type": "string",
                                "format": "decimal",
                                "example": "1960.00",
                                "description": "текущая цена"
                              },
                              "discount": {
                                "type": "integer",
                                "example": 20,
                                "description": "скидка (в %)"
                              },
                              "quantity": {
                                "type": "integer",
                                "example": 5,
                                "description": "доступно (кол-во)"
                              },
                              "unit": {
                                "type": "string",
                                "nullable": true
                              },
                              "is_favourite": {
                                "type": "boolean",
                                "example": false,
                                "description": "признак «в избранном»"
                              },
                              "tags": {
                                "type": "array",
                                "items": {}
                              }
                            }
                          }
                        },
                        "first_page_url": {
                          "type": "string",
                          "format": "uri",
                          "example": "http://192.168.0.43:8000/counterparty/products?page=1"
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page_url": {
                          "type": "string",
                          "format": "uri",
                          "example": "http://192.168.0.43:8000/counterparty/products?page=1"
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string",
                                "nullable": true
                              },
                              "label": {
                                "type": "string",
                                "example": "&laquo; Предыдущая"
                              },
                              "active": {
                                "type": "boolean",
                                "example": false
                              }
                            }
                          }
                        },
                        "next_page_url": {
                          "type": "string",
                          "nullable": true
                        },
                        "path": {
                          "type": "string",
                          "format": "uri",
                          "example": "http://192.168.0.43:8000/counterparty/products"
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10,
                          "description": "кол-во элементов на странице"
                        },
                        "prev_page_url": {
                          "type": "string",
                          "nullable": true
                        },
                        "to": {
                          "type": "integer",
                          "example": 1
                        },
                        "total": {
                          "type": "integer",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Товары/#products-list"
        },
        "description": "#### Параметры запроса - `page` — текущая страница (для пагинации) - `per_page` — кол-во элементов на странице - `query` — опциональный параметр для поиска товаров по названию - `country_id[]` — массив ID стран для фильтрации - `category_id[]` — массив ID категорий для фильтрации - `brand_id[]` — массив ID брендов для фильтрации - `order_by` — сортировка: `price_asc`, `price_desc`, `popularity_asc`, `popularity_desc` - `available` — наличие: `online` или `offline` - `sale` — `true` для товаров со скидками, `false` для всех - `price_from` — минимальная цена - `price_to` — максимальная цена",
        "x-used-in": [
          "17.1",
          "17.5"
        ]
      }
    },
    "/api/counterparty/products/favourites": {
      "get": {
        "summary": "Получение списка избранных товаров",
        "operationId": "favourites-list",
        "tags": [
          "E-Commerce / Товары"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "products": {
                      "type": "object",
                      "properties": {
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "photo": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://beta.back.erp.itecho.ru/storage/uploads/full_covericious_glow_fit_foundation_spf25_pa__23_peanut.jpg"
                              },
                              "name": {
                                "type": "string",
                                "example": "BANILA CO Glow Fit Foundation Brush"
                              },
                              "old_price": {
                                "type": "string",
                                "format": "decimal",
                                "example": "0.00"
                              },
                              "price": {
                                "type": "string",
                                "format": "decimal",
                                "example": "2450.00"
                              },
                              "discount": {
                                "type": "integer",
                                "example": 0
                              },
                              "quantity": {
                                "type": "integer",
                                "example": 5
                              },
                              "unit": {
                                "type": "string",
                                "example": "шт."
                              },
                              "is_favourite": {
                                "type": "boolean",
                                "example": true
                              }
                            }
                          }
                        },
                        "first_page_url": {
                          "type": "string",
                          "format": "uri",
                          "example": "https://api.gigma.ru/api/counterparty/products/favourites?page=1"
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page_url": {
                          "type": "string",
                          "format": "uri",
                          "example": "https://api.gigma.ru/api/counterparty/products/favourites?page=1"
                        },
                        "links": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string",
                                "nullable": true
                              },
                              "label": {
                                "type": "string",
                                "example": "&laquo; Предыдущая"
                              },
                              "active": {
                                "type": "boolean",
                                "example": false
                              }
                            }
                          }
                        },
                        "next_page_url": {
                          "type": "string",
                          "nullable": true
                        },
                        "path": {
                          "type": "string",
                          "format": "uri",
                          "example": "https://api.gigma.ru/api/counterparty/products/favourites"
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10
                        },
                        "prev_page_url": {
                          "type": "string",
                          "nullable": true
                        },
                        "to": {
                          "type": "integer",
                          "example": 1
                        },
                        "total": {
                          "type": "integer",
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Товары/#favourites-list"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      },
      "post": {
        "summary": "Добавление товара в избранные",
        "operationId": "favourites-add",
        "tags": [
          "E-Commerce / Товары"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "photos": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 14
                              },
                              "name": {
                                "type": "string",
                                "example": "full_covericious_glow_fit_foundation_spf25_pa__23_peanut.jpg"
                              },
                              "path": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://beta.back.erp.itecho.ru/storage/uploads/full_covericious_glow_fit_foundation_spf25_pa__23_peanut.jpg"
                              }
                            }
                          }
                        },
                        "name": {
                          "type": "string",
                          "example": "BANILA CO Glow Fit Foundation Brush"
                        },
                        "description": {
                          "type": "string",
                          "example": "BANILA CO Glow Fit Foundation Brush – это инновационная кисть для нанесения тонального средства, которая обеспечивает идеальное покрытие без разводов и пятен. Эта кисть создана для того, чтобы сделать процесс нанесения макияжа быстрым и легким, а результат – просто невероятным."
                        },
                        "old_price": {
                          "type": "string",
                          "format": "decimal",
                          "example": "0.00"
                        },
                        "price": {
                          "type": "string",
                          "format": "decimal",
                          "example": "2450.00"
                        },
                        "discount": {
                          "type": "integer",
                          "example": 0
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 5
                        },
                        "unit": {
                          "type": "string",
                          "example": "шт."
                        },
                        "is_favourite": {
                          "type": "boolean",
                          "example": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Товары/#favourites-add"
        },
        "description": "#### Параметры запроса - `product_id` — ID товара из запроса получения списка товаров",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "product_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID товара из запроса получения списка товаров"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/counterparty/products/favourites/{id}": {
      "delete": {
        "summary": "Удаление товара из избранных",
        "operationId": "favourites-remove",
        "tags": [
          "E-Commerce / Товары"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Товары/#favourites-remove"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      }
    },
    "/api/counterparty/notifications": {
      "get": {
        "summary": "Получение списка уведомлений",
        "operationId": "notifications-list",
        "tags": [
          "E-Commerce / Уведомления"
        ],
        "parameters": [],
        "security": [
          {
            "bearerEcomAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "notifications": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ (ID уведомления)"
                          },
                          "icon": {
                            "type": "string",
                            "format": "uri",
                            "example": "https://beta.back.erp.itecho.ru/storage/uploads/order_complete.svg",
                            "description": "URL ссылка на иконку"
                          },
                          "title": {
                            "type": "string",
                            "example": "Заказ 1",
                            "description": "заголовок уведомления"
                          },
                          "status": {
                            "type": "string",
                            "example": "Выдан",
                            "description": "тело уведомления (текст)"
                          },
                          "action_url": {
                            "type": "string",
                            "format": "uri",
                            "example": "https://google.ru",
                            "description": "URL ссылка для выполнения необходимых действий"
                          },
                          "created_at": {
                            "type": "string",
                            "example": "19.02.24 17:45",
                            "description": "дата и время добавления в систему"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "example": 1
                        },
                        "per_page": {
                          "type": "integer",
                          "example": 10,
                          "description": "кол-во элементов на странице"
                        },
                        "current_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "last_page": {
                          "type": "integer",
                          "example": 1
                        },
                        "from": {
                          "type": "integer",
                          "example": 1
                        },
                        "to": {
                          "type": "integer",
                          "example": 1
                        }
                      },
                      "description": "объект с информацией о пагинации и её текущем статусе"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/E-Commerce/Уведомления/#notifications-list"
        },
        "description": "⚠ **Заглушка.** Контроллер возвращает пустой массив (`\"notifications\": []`). Функциональность уведомлений пока не реализована на бэкенде.",
        "x-used-in": [
          "17.1"
        ]
      }
    },
    "/api/send_password": {
      "post": {
        "summary": "Отправка пароля на электронную почту",
        "operationId": "send-password",
        "tags": [
          "ERP / Авторизация"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Password successfully send",
                      "description": "информационное поле"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Авторизация/#send-password"
        },
        "description": "#### Параметры запроса - `login` — адрес электронной почты",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "login": {
                    "type": "string",
                    "example": "2141349@mail.ru",
                    "description": "адрес электронной почты"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/login": {
      "post": {
        "summary": "Авторизация",
        "operationId": "login",
        "tags": [
          "ERP / Авторизация"
        ],
        "parameters": [],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "access_token": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "string",
                              "example": "28|dCWBGIqC9algoNXr6NVVg9D2fKWBaq7BJkRFyxq009cd040b",
                              "description": "Bearer-токен. Во всех последующих запросах слать заголовком:"
                            }
                          }
                        },
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "role": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "owner"
                            },
                            "description": {
                              "type": "string",
                              "example": "Собственник"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-27T07:00:46.000000Z"
                            }
                          }
                        },
                        "branch": {
                          "type": "string",
                          "nullable": true
                        },
                        "department": {
                          "type": "string",
                          "nullable": true
                        },
                        "login": {
                          "type": "string",
                          "example": "2141349@mail.ru",
                          "description": "адрес электронной почты"
                        },
                        "phone": {
                          "type": "string",
                          "example": "79139121349"
                        },
                        "first_name": {
                          "type": "string",
                          "example": "Артём"
                        },
                        "last_name": {
                          "type": "string",
                          "example": "Полищук"
                        },
                        "middle_name": {
                          "type": "string",
                          "example": "Николаевич"
                        },
                        "birthday": {
                          "type": "string",
                          "format": "date",
                          "example": "1981-05-20"
                        },
                        "employment_date": {
                          "type": "string",
                          "nullable": true
                        },
                        "dismissal_date": {
                          "type": "string",
                          "nullable": true
                        },
                        "avatar": {
                          "type": "string",
                          "nullable": true
                        },
                        "employment_contract": {
                          "type": "string",
                          "nullable": true
                        },
                        "is_banned": {
                          "type": "boolean",
                          "example": false
                        },
                        "is_sick": {
                          "type": "boolean",
                          "example": false
                        },
                        "creator": {
                          "type": "string",
                          "nullable": true
                        },
                        "active_time": {
                          "type": "integer",
                          "example": 0
                        },
                        "last_activity_at": {
                          "type": "string",
                          "nullable": true
                        },
                        "permissions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 2
                              },
                              "screen": {
                                "type": "string",
                                "nullable": true
                              },
                              "name": {
                                "type": "string",
                                "example": "edit-admins"
                              },
                              "description": {
                                "type": "string",
                                "example": "Редактирование администраторов"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-03-27T07:00:46.000000Z"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-03-27T07:00:46.000000Z"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-04-03T07:07:11.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Авторизация/#login"
        },
        "description": "#### Параметры запроса - `login` *(string, обязательно)* — адрес электронной почты - `password` *(string, обязательно)* — пароль из письма, отправленного по `POST /api/send_password` > **Про пароль.** В примерах ниже стоит условный `\"1111\"`. На реальном сервере пароль строго из письма, которое приходит после `POST /api/send_password`.",
        "x-used-in": [
          "17.2",
          "17.3",
          "17.4",
          "17.5",
          "17.7"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "login": {
                    "type": "string",
                    "example": "2141349@mail.ru",
                    "description": "адрес электронной почты"
                  },
                  "password": {
                    "type": "string",
                    "example": "1111",
                    "description": "пароль из письма, отправленного по POST /api/send_password"
                  }
                },
                "required": [
                  "login",
                  "password"
                ]
              }
            }
          }
        }
      }
    },
    "/api/user": {
      "get": {
        "summary": "Получение текущего пользователя",
        "operationId": "current-user",
        "tags": [
          "ERP / Авторизация"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ пользователя"
                        },
                        "role": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ пользователя"
                            },
                            "name": {
                              "type": "string",
                              "example": "owner"
                            },
                            "description": {
                              "type": "string",
                              "example": "Собственник"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-27T07:00:46.000000Z"
                            }
                          },
                          "description": "объект, содержащий роль пользователя в системе"
                        },
                        "branch": {
                          "type": "string",
                          "nullable": true
                        },
                        "department": {
                          "type": "string",
                          "nullable": true
                        },
                        "login": {
                          "type": "string",
                          "example": "2141349@mail.ru",
                          "description": "адрес электронной почты пользователя"
                        },
                        "phone": {
                          "type": "string",
                          "example": "79139121349",
                          "description": "номер телефона пользователя"
                        },
                        "first_name": {
                          "type": "string",
                          "example": "Артём",
                          "description": "имя пользователя"
                        },
                        "last_name": {
                          "type": "string",
                          "example": "Полищук",
                          "description": "фамилия пользователя"
                        },
                        "middle_name": {
                          "type": "string",
                          "example": "Николаевич",
                          "description": "отчество пользователя"
                        },
                        "birthday": {
                          "type": "string",
                          "format": "date",
                          "example": "1981-05-20",
                          "description": "дата рождения пользователя"
                        },
                        "employment_date": {
                          "type": "string",
                          "nullable": true
                        },
                        "dismissal_date": {
                          "type": "string",
                          "nullable": true
                        },
                        "avatar": {
                          "type": "string",
                          "nullable": true
                        },
                        "employment_contract": {
                          "type": "string",
                          "nullable": true
                        },
                        "is_banned": {
                          "type": "boolean",
                          "example": false,
                          "description": "статус блокировки пользователя"
                        },
                        "is_sick": {
                          "type": "boolean",
                          "example": false,
                          "description": "статус больничного"
                        },
                        "creator": {
                          "type": "string",
                          "nullable": true
                        },
                        "active_time": {
                          "type": "integer",
                          "example": 0,
                          "description": "активное время пользователя в системе"
                        },
                        "last_activity_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-04-03T07:07:19.000000Z",
                          "description": "дата и время последней активности пользователя"
                        },
                        "permissions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 2,
                                "description": "первичный ключ пользователя"
                              },
                              "screen": {
                                "type": "string",
                                "nullable": true
                              },
                              "name": {
                                "type": "string",
                                "example": "edit-admins"
                              },
                              "description": {
                                "type": "string",
                                "example": "Редактирование администраторов"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-03-27T07:00:46.000000Z"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-03-27T07:00:46.000000Z"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-04-03T07:07:11.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Авторизация/#current-user"
        },
        "description": "#### Параметры запроса Отсутствуют."
      }
    },
    "/api/user/logout": {
      "post": {
        "summary": "Выход пользователя из системы",
        "operationId": "logout",
        "tags": [
          "ERP / Авторизация"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "User successfully logout from all devices",
                      "description": "информационное поле"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Авторизация/#logout"
        },
        "description": "#### Параметры запроса - `from_all_devices` — признак, указывающий на необходимость выхода сразу со всех устройств",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from_all_devices": {
                    "type": "boolean",
                    "example": true,
                    "description": "признак, указывающий на необходимость выхода сразу со всех устройств"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/branches": {
      "get": {
        "summary": "Список бизнесов",
        "operationId": "branches-list",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "branches": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "code": {
                            "type": "string",
                            "example": "1349",
                            "description": "внутренний код бизнеса"
                          },
                          "responsible_user": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 2,
                                "description": "первичный ключ"
                              },
                              "first_name": {
                                "type": "string",
                                "example": "Алексей"
                              },
                              "last_name": {
                                "type": "string",
                                "example": "Жуков"
                              },
                              "middle_name": {
                                "type": "string",
                                "example": "Игоревич"
                              },
                              "name": {
                                "type": "string",
                                "example": "Жуков Алексей",
                                "description": "полное юридическое наименование"
                              }
                            },
                            "description": "ответственный пользователь (объект): id, first_name, last_name, middle_name, name"
                          },
                          "avatar": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 40,
                                "description": "первичный ключ"
                              },
                              "name": {
                                "type": "string",
                                "example": "organic-cosmetics.png",
                                "description": "полное юридическое наименование"
                              },
                              "path": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://beta.back.erp.itecho.ru/storage/uploads/organic-cosmetics.png"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-06-17T16:05:02.000000Z",
                                "description": "дата создания"
                              },
                              "updated_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-06-17T16:05:02.000000Z"
                              }
                            },
                            "description": "файл аватара/логотипа или null"
                          },
                          "title": {
                            "type": "string",
                            "example": "Продажа косметики",
                            "description": "короткое название проекта/бизнеса"
                          },
                          "inn": {
                            "type": "string",
                            "example": "5403057658",
                            "description": "реквизиты юрлица"
                          },
                          "name": {
                            "type": "string",
                            "example": "ООО \"АЙТЕКО\"",
                            "description": "полное юридическое наименование"
                          },
                          "kpp": {
                            "type": "string",
                            "example": "540301001"
                          },
                          "phone_1": {
                            "type": "string",
                            "example": "79139121349"
                          },
                          "phone_2": {
                            "type": "string",
                            "example": "71231231231"
                          },
                          "email": {
                            "type": "string",
                            "example": "support@itecho.ru"
                          },
                          "head": {
                            "type": "string",
                            "example": "Снегирёв Алексей Игоревич",
                            "description": "ФИО директора"
                          },
                          "address": {
                            "type": "string",
                            "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26",
                            "description": "фактический адрес"
                          },
                          "legal_address": {
                            "type": "string",
                            "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26",
                            "description": "юридический адрес"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-03-27T07:26:29.000000Z",
                            "description": "дата создания"
                          }
                        }
                      }
                    },
                    "branchesCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "общее количество бизнесов"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#branches-list"
        },
        "description": "#### Параметры запроса (query string) - `query` — поисковая строка (необязательно)"
      },
      "post": {
        "summary": "Создание бизнеса",
        "operationId": "branch-create",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "branch": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 42
                        },
                        "...": {
                          "type": "string",
                          "example": "поля как в GET"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#branch-create"
        },
        "description": "#### Параметры запроса (тело) - `title` — короткое название проекта - `name` — полное юридическое наименование - `code` — внутренний код - `inn`, `kpp` — реквизиты юрлица - `head` — ФИО директора - `phone_1`, `phone_2`, `email` - `address` — фактический адрес - `legal_address` — юридический адрес - `responsible_user_id` — ID ответственного пользователя (nullable) - `avatar_id` — ID файла аватара (необязательно)",
        "x-used-in": [
          "17.3"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "example": "Продажа косметики",
                    "description": "короткое название проекта"
                  },
                  "name": {
                    "type": "string",
                    "example": "ООО \"АЙТЕКО\"",
                    "description": "полное юридическое наименование"
                  },
                  "code": {
                    "type": "string",
                    "example": "1349",
                    "description": "внутренний код"
                  },
                  "inn": {
                    "type": "string",
                    "example": "5403057658",
                    "description": "реквизиты юрлица"
                  },
                  "kpp": {
                    "type": "string",
                    "example": "540301001"
                  },
                  "head": {
                    "type": "string",
                    "example": "Снегирёв Алексей Игоревич",
                    "description": "ФИО директора"
                  },
                  "phone_1": {
                    "type": "string",
                    "example": "79139121349"
                  },
                  "phone_2": {
                    "type": "string",
                    "example": "71231231231"
                  },
                  "email": {
                    "type": "string",
                    "example": "support@itecho.ru"
                  },
                  "address": {
                    "type": "string",
                    "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26",
                    "description": "фактический адрес"
                  },
                  "legal_address": {
                    "type": "string",
                    "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26",
                    "description": "юридический адрес"
                  },
                  "responsible_user_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "Ответственный пользователь (упрощённый объект) Получить актуальные значения: `GET /api/responsible_users`"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 40,
                    "description": "ID файла аватара (необязательно)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/tables/branches": {
      "get": {
        "summary": "Таблица бизнесов (для UI с колонками и пагинацией)",
        "operationId": "branches-table",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TablesEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "branches": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "code": {
                                "type": "string",
                                "example": "1349"
                              },
                              "title": {
                                "type": "string",
                                "example": "Продажа косметики"
                              },
                              "inn": {
                                "type": "string",
                                "example": "5403057658"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "branches"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#branches-table"
        },
        "description": "Возвращает данные, готовые к отрисовке таблицы: список колонок, упрощённые бизнесы и пагинацию."
      }
    },
    "/api/branches/{id}": {
      "get": {
        "summary": "Получение бизнеса по ID",
        "operationId": "branch-get",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "branch": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "code": {
                          "type": "string",
                          "example": "1349"
                        },
                        "responsible_user": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Алексей"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Жуков"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Игоревич"
                            },
                            "name": {
                              "type": "string",
                              "example": "Жуков Алексей"
                            }
                          }
                        },
                        "avatar": {
                          "type": "string",
                          "nullable": true
                        },
                        "title": {
                          "type": "string",
                          "example": "Разработка и продажа ПО"
                        },
                        "inn": {
                          "type": "string",
                          "example": "5403057658"
                        },
                        "name": {
                          "type": "string",
                          "example": "ООО \"АЙТЕКО\""
                        },
                        "kpp": {
                          "type": "string",
                          "example": "540301001"
                        },
                        "phone_1": {
                          "type": "string",
                          "example": "79139121349"
                        },
                        "phone_2": {
                          "type": "string",
                          "nullable": true
                        },
                        "email": {
                          "type": "string",
                          "example": "support@itecho.ru"
                        },
                        "head": {
                          "type": "string",
                          "example": "Снегирёв Алексей Игоревич"
                        },
                        "address": {
                          "type": "string",
                          "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26"
                        },
                        "legal_address": {
                          "type": "string",
                          "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-03-27T07:26:29.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#branch-get"
        },
        "description": "#### Параметры запроса Только `id` бизнеса в пути URL."
      },
      "put": {
        "summary": "Изменение бизнеса",
        "operationId": "branch-update",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "branch": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "...": {
                          "type": "string",
                          "example": "обновлённый объект"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#branch-update"
        },
        "description": "#### Параметры запроса (тело) Те же поля, что и в `POST /api/branches`."
      },
      "delete": {
        "summary": "Удаление бизнеса",
        "operationId": "branch-delete",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#branch-delete"
        },
        "description": "#### Параметры запроса Только `id` бизнеса в пути URL."
      }
    },
    "/api/branches/{id}/bank_requisites": {
      "get": {
        "summary": "Список реквизитов бизнеса",
        "operationId": "branch-bank-requisites-list",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bankRequisites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Расчётный счёт в Сбербанке"
                          },
                          "bik": {
                            "type": "string",
                            "example": "045004641"
                          },
                          "kpp": {
                            "type": "string",
                            "example": "540301001"
                          },
                          "payment_account": {
                            "type": "string",
                            "example": "40702810844050003101"
                          },
                          "address": {
                            "type": "string",
                            "example": "630007, г. Новосибирск, Красный проспект, д. 5"
                          }
                        }
                      }
                    },
                    "bankRequisitesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#branch-bank-requisites-list"
        },
        "description": "#### Ответ"
      },
      "post": {
        "summary": "Добавление реквизита бизнеса",
        "operationId": "branch-bank-requisite-create",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#branch-bank-requisite-create"
        },
        "description": "#### Параметры запроса (тело) - `name` — название счёта/банка - `bik` — БИК - `kpp` — КПП - `payment_account` — номер расчётного счёта - `address` — адрес банка",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Расчётный счёт в Сбербанке",
                    "description": "название счёта/банка"
                  },
                  "bik": {
                    "type": "string",
                    "example": "045004641",
                    "description": "БИК"
                  },
                  "kpp": {
                    "type": "string",
                    "example": "540301001",
                    "description": "КПП"
                  },
                  "payment_account": {
                    "type": "string",
                    "example": "40702810844050003101",
                    "description": "номер расчётного счёта"
                  },
                  "address": {
                    "type": "string",
                    "example": "630007, г. Новосибирск, Красный проспект, д. 5",
                    "description": "адрес банка"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/branches/{id}/bank_requisites/{requisiteId}": {
      "put": {
        "summary": "Изменение реквизита бизнеса",
        "operationId": "branch-bank-requisite-update",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "requisiteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#branch-bank-requisite-update"
        },
        "description": "#### Параметры запроса (тело) Те же поля, что и в POST."
      }
    },
    "/api/branches/{id}/history": {
      "get": {
        "summary": "История изменений бизнеса",
        "operationId": "branch-history",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/LaravelPaginator"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 101,
                                "description": "ID события"
                              },
                              "icon": {
                                "type": "string",
                                "example": "edit",
                                "description": "имя иконки (edit, add, delete, …)"
                              },
                              "color": {
                                "type": "string",
                                "example": "info",
                                "description": "primary | secondary | info | success | warning | error | dark | light"
                              },
                              "title": {
                                "type": "string",
                                "example": "Изменён телефон",
                                "description": "короткий заголовок"
                              },
                              "description": {
                                "type": "string",
                                "example": "phone_1: 79139121349 → 79991112233",
                                "description": "описание изменения"
                              },
                              "datetime": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-04-03T07:07:11.000000Z",
                                "description": "ISO-8601"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#branch-history"
        },
        "description": "#### Ответ"
      }
    },
    "/api/branches/{branchId}/bank_requisites/{bankId}/integrations": {
      "get": {
        "summary": "Список интеграций реквизита",
        "operationId": "integrations-list",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bankId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integrations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "ID связи (реквизит ↔ интеграция)"
                          },
                          "integration_id": {
                            "type": "integer",
                            "example": 5,
                            "description": "ID типа интеграции в каталоге"
                          },
                          "name": {
                            "type": "string",
                            "example": "Сбербанк API",
                            "description": "название интеграции"
                          },
                          "avatar": {
                            "type": "string",
                            "format": "uri",
                            "example": "https://beta.back.erp.itecho.ru/storage/integrations/sberbank.svg",
                            "description": "URL логотипа"
                          },
                          "is_active": {
                            "type": "integer",
                            "example": 1,
                            "description": "1 если активна, иначе 0"
                          },
                          "parameters": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "ID связи (реквизит ↔ интеграция)"
                                },
                                "title": {
                                  "type": "string",
                                  "example": "Логин"
                                },
                                "order": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "key_1": {
                                  "type": "string",
                                  "example": "login"
                                },
                                "key_2": {
                                  "type": "string",
                                  "example": "password"
                                },
                                "description_1": {
                                  "type": "string",
                                  "example": "Логин"
                                },
                                "description_2": {
                                  "type": "string",
                                  "example": "Пароль"
                                }
                              }
                            }
                          },
                          "values": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "ID связи (реквизит ↔ интеграция)"
                                },
                                "key_1": {
                                  "type": "string",
                                  "example": "login"
                                },
                                "key_2": {
                                  "type": "string",
                                  "example": "password"
                                },
                                "description_1": {
                                  "type": "string",
                                  "example": "Логин"
                                },
                                "description_2": {
                                  "type": "string",
                                  "example": "Пароль"
                                },
                                "value_1": {
                                  "type": "string",
                                  "example": "user123"
                                },
                                "value_2": {
                                  "type": "string",
                                  "example": "***"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "integrationsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#integrations-list"
        },
        "description": "#### Ответ"
      }
    },
    "/api/branches/{branchId}/bank_requisites/{bankId}/integrations/{integrationsId}": {
      "put": {
        "summary": "Изменение интеграции реквизита",
        "operationId": "integration-update",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bankId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "integrationsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "integration_id": {
                          "type": "integer",
                          "example": 5
                        },
                        "name": {
                          "type": "string",
                          "example": "Сбербанк API"
                        },
                        "is_active": {
                          "type": "integer",
                          "example": 1,
                          "description": "1 чтобы активировать, 0 чтобы выключить"
                        },
                        "parameters": {
                          "type": "array",
                          "items": {}
                        },
                        "values": {
                          "type": "array",
                          "items": {}
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#integration-update"
        },
        "description": "#### Параметры запроса (тело) - `is_active` — `1` чтобы активировать, `0` чтобы выключить - (опционально) другие поля для обновления"
      }
    },
    "/api/integrations/{integrationId}": {
      "get": {
        "summary": "Описание интеграции по ID",
        "operationId": "integration-show",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 5
                        },
                        "name": {
                          "type": "string",
                          "example": "Сбербанк API"
                        },
                        "avatar": {
                          "type": "string",
                          "format": "uri",
                          "example": "https://beta.back.erp.itecho.ru/storage/integrations/sberbank.svg"
                        },
                        "params": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "title": {
                                "type": "string",
                                "example": "Логин и пароль"
                              },
                              "order": {
                                "type": "integer",
                                "example": 1
                              },
                              "key_1": {
                                "type": "string",
                                "example": "login"
                              },
                              "key_2": {
                                "type": "string",
                                "example": "password"
                              },
                              "description_1": {
                                "type": "string",
                                "example": "Логин"
                              },
                              "description_2": {
                                "type": "string",
                                "example": "Пароль"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#integration-show"
        },
        "description": "Возвращает каталожное описание интеграции (без привязки к реквизиту) — нужно, чтобы узнать какие параметры она ждёт."
      }
    },
    "/api/branches/{branchId}/bank_requisites/{bankId}/integrations/{integrationId}/parameters": {
      "get": {
        "summary": "Параметры (значения) интеграции реквизита",
        "operationId": "integration-parameters-list",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bankId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "parameters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "key_1": {
                            "type": "string",
                            "example": "login"
                          },
                          "description_1": {
                            "type": "string",
                            "example": "Логин"
                          },
                          "key_2": {
                            "type": "string",
                            "example": "password"
                          },
                          "description_2": {
                            "type": "string",
                            "example": "Пароль"
                          },
                          "value_1": {
                            "type": "string",
                            "example": "user123"
                          },
                          "value_2": {
                            "type": "string",
                            "example": "***"
                          }
                        }
                      }
                    },
                    "parametersCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "общее количество"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#integration-parameters-list"
        },
        "description": "#### Ответ"
      }
    },
    "/api/branches/{branchId}/bank_requisites/{bankId}/integrations/{integrationsId}/parameters": {
      "post": {
        "summary": "Добавление значения параметра интеграции",
        "operationId": "integration-parameter-create",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bankId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "integrationsId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "parameter": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 7
                        },
                        "key_1": {
                          "type": "string",
                          "example": "login"
                        },
                        "description_1": {
                          "type": "string",
                          "example": "Логин"
                        },
                        "key_2": {
                          "type": "string",
                          "example": "password"
                        },
                        "description_2": {
                          "type": "string",
                          "example": "Пароль"
                        },
                        "value_1": {
                          "type": "string",
                          "example": "user123",
                          "description": "значение первого поля"
                        },
                        "value_2": {
                          "type": "string",
                          "example": "secret",
                          "description": "значение второго поля"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#integration-parameter-create"
        },
        "description": "#### Параметры запроса (тело) - `integration_parameter_id` — ID определения параметра (из `params[]` интеграции) - `value_1` — значение первого поля - `value_2` — значение второго поля",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_parameter_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID определения параметра (из params[] интеграции)"
                  },
                  "value_1": {
                    "type": "string",
                    "example": "user123",
                    "description": "значение первого поля"
                  },
                  "value_2": {
                    "type": "string",
                    "example": "secret",
                    "description": "значение второго поля"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/branches/{branchId}/bank_requisites/{bankId}/integrations/{integrationId}/parameters/{parameterId}": {
      "delete": {
        "summary": "Удаление значения параметра интеграции",
        "operationId": "integration-parameter-delete",
        "tags": [
          "ERP / Бизнесы"
        ],
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bankId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "integrationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parameterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Бизнесы/#integration-parameter-delete"
        },
        "description": "#### Ответ"
      }
    },
    "/api/responsible_users": {
      "get": {
        "summary": "Список ответственных пользователей",
        "operationId": "responsible-users",
        "tags": [
          "ERP / Пользователи"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "responsibleUsers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 2
                          },
                          "name": {
                            "type": "string",
                            "example": "Жуков Алексей"
                          }
                        }
                      }
                    },
                    "responsibleUsersCount": {
                      "type": "integer",
                      "example": 2
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Пользователи/#responsible-users"
        },
        "description": "Используется в фильтре «Ответственный» в таблице бизнесов и других местах."
      }
    },
    "/api/users": {
      "get": {
        "summary": "Поиск пользователей",
        "operationId": "users-search",
        "tags": [
          "ERP / Пользователи"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 31,
                            "description": "первичный ключ"
                          },
                          "role": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 3,
                                "description": "первичный ключ"
                              },
                              "name": {
                                "type": "string",
                                "example": "manager"
                              },
                              "avatar": {
                                "type": "string",
                                "nullable": true
                              },
                              "description": {
                                "type": "string",
                                "example": "Руководитель отдела"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-03-27T07:00:46.000000Z",
                                "description": "таймстампы"
                              }
                            },
                            "description": "роль в системе (id, name, description)"
                          },
                          "branch": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "первичный ключ"
                              },
                              "name": {
                                "type": "string",
                                "example": "ООО \"АЙТЕКО\""
                              },
                              "avatar": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://api.gigma.ru/storage/uploads/9qzh2GCaYpRpaxXnql0JZYpIesu3qlvQLV2OBhcN.png",
                                "description": "объект файла аватара или null"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-03-27T07:26:29.000000Z",
                                "description": "таймстампы"
                              }
                            },
                            "description": "филиал, к которому привязан"
                          },
                          "department": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "первичный ключ"
                              },
                              "name": {
                                "type": "string",
                                "example": "Технический"
                              },
                              "avatar": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                "description": "объект файла аватара или null"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-03-27T07:00:46.000000Z",
                                "description": "таймстампы"
                              }
                            },
                            "description": "отдел"
                          },
                          "login": {
                            "type": "string",
                            "example": "yaroslav42@er.fs",
                            "description": "логин (email)"
                          },
                          "phone": {
                            "type": "string",
                            "example": "71235512351",
                            "description": "телефон"
                          },
                          "first_name": {
                            "type": "string",
                            "example": "Jon",
                            "description": "ФИО + ДР"
                          },
                          "last_name": {
                            "type": "string",
                            "example": "Doe"
                          },
                          "middle_name": {
                            "type": "string",
                            "example": "Stewart"
                          },
                          "birthday": {
                            "type": "string",
                            "format": "date",
                            "example": "2024-07-03"
                          },
                          "employment_date": {
                            "type": "string",
                            "nullable": true
                          },
                          "dismissal_date": {
                            "type": "string",
                            "nullable": true
                          },
                          "avatar": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 456,
                                "description": "первичный ключ"
                              },
                              "name": {
                                "type": "string",
                                "example": "photo.jpg"
                              },
                              "type": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 2,
                                    "description": "первичный ключ"
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Аватар"
                                  },
                                  "avatar": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                    "description": "объект файла аватара или null"
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "example": "2024-03-27T07:00:46.000000Z",
                                    "description": "таймстампы"
                                  }
                                }
                              },
                              "path": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://api.gigma.ru/storage/uploads/YiSnszaC109sWAJKsvcWvK6IDR8sF1JC3X9Nve5X.jpg"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-07-24T10:48:49.000000Z",
                                "description": "таймстампы"
                              },
                              "updated_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-07-24T10:48:49.000000Z"
                              }
                            },
                            "description": "объект файла аватара или null"
                          },
                          "employment_contract": {
                            "type": "string",
                            "nullable": true
                          },
                          "is_banned": {
                            "type": "boolean",
                            "example": false,
                            "description": "флаги"
                          },
                          "is_sick": {
                            "type": "boolean",
                            "example": false
                          },
                          "creator": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "первичный ключ"
                              },
                              "first_name": {
                                "type": "string",
                                "example": "Артём",
                                "description": "ФИО + ДР"
                              },
                              "last_name": {
                                "type": "string",
                                "example": "Полищук"
                              },
                              "middle_name": {
                                "type": "string",
                                "example": "Николаевич"
                              },
                              "name": {
                                "type": "string",
                                "example": "Полищук Артём"
                              }
                            },
                            "description": "кто завёл этого пользователя"
                          },
                          "active_time": {
                            "type": "integer",
                            "example": 0,
                            "description": "активность"
                          },
                          "last_activity_at": {
                            "type": "string",
                            "nullable": true
                          },
                          "permissions": {
                            "type": "array",
                            "items": {}
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-07-19T16:14:14.000000Z",
                            "description": "таймстампы"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-07-25T12:19:56.000000Z"
                          }
                        }
                      }
                    },
                    "usersCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Пользователи/#users-search"
        },
        "description": "#### Параметры запроса (query string) - `query` — поисковая строка по ФИО или login"
      }
    },
    "/api/tables/applications/{id}/blocks": {
      "get": {
        "summary": "Получение списка блоков (табличное представление)",
        "operationId": "blocks-table",
        "tags": [
          "ERP / Блоки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TablesEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "blocks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "value": {
                                    "type": "integer",
                                    "example": 7
                                  },
                                  "url": {
                                    "type": "string",
                                    "example": ""
                                  }
                                },
                                "description": "первичный ключ (номер заказа)"
                              },
                              "date": {
                                "type": "string",
                                "example": "25 янв 2025"
                              },
                              "name": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://api.gigma.ru/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Видео на главной странице"
                                  }
                                },
                                "description": "название блока"
                              },
                              "path": {
                                "type": "string",
                                "example": "> Главная > Видео на главной странице"
                              },
                              "block_type": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://api.gigma.ru/api//storage/uploads/image-profile-2.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Картинка"
                                  }
                                },
                                "description": "объект с информацией о типе блока"
                              },
                              "creator": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://api.gigma.ru/api//storage/uploads/cdO1uLpgY29TgnFLhaJWQkjK8VDxMg2fk3dp0ihW.png"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Воронова София"
                                  },
                                  "link": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://beta.gigma.ru/users/list-users/66"
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "blocks"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Блоки/#blocks-table"
        },
        "description": "#### Параметры запроса - `applications/{id}` — ID приложения из списка приложений - `query` — поисковая строка"
      }
    },
    "/api/applications/{id}/blocks": {
      "get": {
        "summary": "Получение списка блоков",
        "operationId": "blocks-list",
        "tags": [
          "ERP / Блоки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 8
                      },
                      "code": {
                        "type": "integer",
                        "example": 1
                      },
                      "name": {
                        "type": "string",
                        "example": "Первый блок (текстовый)"
                      },
                      "avatar": {
                        "type": "string",
                        "nullable": true
                      },
                      "block_type": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Обычный текст"
                          },
                          "avatar": {
                            "type": "string",
                            "format": "uri",
                            "example": "https://api.gigma.ru/api//storage/uploads/image-profile-1.svg"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2025-01-23T09:47:38.000000Z"
                          }
                        }
                      },
                      "link": {
                        "type": "string",
                        "nullable": true
                      },
                      "file": {
                        "type": "string",
                        "nullable": true
                      },
                      "text": {
                        "type": "string",
                        "example": "Текст"
                      },
                      "parent": {
                        "type": "string",
                        "nullable": true
                      },
                      "children": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 9
                            },
                            "code": {
                              "type": "integer",
                              "example": 2
                            },
                            "name": {
                              "type": "string",
                              "example": "Второй блок"
                            },
                            "avatar": {
                              "type": "string",
                              "nullable": true
                            },
                            "block_type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 5
                                },
                                "name": {
                                  "type": "string",
                                  "example": "URL ссылка"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://api.gigma.ru/api//storage/uploads/image-profile-4.svg"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2025-01-23T09:47:38.000000Z"
                                }
                              }
                            },
                            "link": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://yandex.ru"
                            },
                            "file": {
                              "type": "string",
                              "nullable": true
                            },
                            "text": {
                              "type": "string",
                              "nullable": true
                            },
                            "parent": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 8
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Первый блок (текстовый)"
                                }
                              }
                            },
                            "children": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 10
                                  },
                                  "code": {
                                    "type": "integer",
                                    "example": 3
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Третий блок"
                                  },
                                  "avatar": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "block_type": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "integer",
                                        "example": 3
                                      },
                                      "name": {
                                        "type": "string",
                                        "example": "Картинка"
                                      },
                                      "avatar": {
                                        "type": "string",
                                        "format": "uri",
                                        "example": "https://api.gigma.ru/api//storage/uploads/image-profile-2.svg"
                                      },
                                      "created_at": {
                                        "type": "string",
                                        "format": "date-time",
                                        "example": "2025-01-23T09:47:38.000000Z"
                                      }
                                    }
                                  },
                                  "link": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "file": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "integer",
                                        "example": 2827
                                      },
                                      "name": {
                                        "type": "string",
                                        "example": "Da Chirillo - Колбасы и деликатесы премиум качества.png"
                                      },
                                      "type": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "integer",
                                            "example": 1
                                          },
                                          "name": {
                                            "type": "string",
                                            "example": "Трудовой договор"
                                          },
                                          "avatar": {
                                            "type": "string",
                                            "format": "uri",
                                            "example": "https://api.gigma.ru/storage/uploads/default.svg"
                                          },
                                          "created_at": {
                                            "type": "string",
                                            "format": "date-time",
                                            "example": "2024-03-27T07:00:46.000000Z"
                                          }
                                        }
                                      },
                                      "path": {
                                        "type": "string",
                                        "format": "uri",
                                        "example": "https://api.gigma.ru/storage/uploads/IcnkXX2tyYQcFtuNOYEsbrgRX13T1IVkeyTTHxqH.png"
                                      },
                                      "link": {
                                        "type": "string",
                                        "nullable": true
                                      },
                                      "created_at": {
                                        "type": "string",
                                        "format": "date-time",
                                        "example": "2025-01-27T14:17:14.000000Z"
                                      },
                                      "updated_at": {
                                        "type": "string",
                                        "format": "date-time",
                                        "example": "2025-01-27T14:17:14.000000Z"
                                      }
                                    }
                                  },
                                  "text": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "parent": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "integer",
                                        "example": 9
                                      },
                                      "name": {
                                        "type": "string",
                                        "example": "Второй блок"
                                      }
                                    }
                                  },
                                  "children": {
                                    "type": "array",
                                    "items": {}
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "example": "2025-01-27T14:17:14.000000Z"
                                  }
                                }
                              }
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-01-27T14:12:38.000000Z"
                            }
                          }
                        }
                      },
                      "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2025-01-27T13:03:19.000000Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Блоки/#blocks-list"
        },
        "description": "#### Параметры запроса - `applications/{id}` — ID приложения из списка приложений - `query` — поисковая строка"
      },
      "post": {
        "summary": "Добавление блока",
        "operationId": "block-create",
        "tags": [
          "ERP / Блоки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "block": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 5
                        },
                        "code": {
                          "type": "integer",
                          "example": 5
                        },
                        "name": {
                          "type": "string",
                          "example": "Параметр 1",
                          "description": "имя блока"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg",
                              "description": "имя блока"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор",
                                  "description": "имя блока"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            }
                          }
                        },
                        "block_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3
                            },
                            "name": {
                              "type": "string",
                              "example": "Картинка",
                              "description": "имя блока"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/api//storage/uploads/image-profile-2.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-01-23T09:47:38.000000Z"
                            }
                          }
                        },
                        "link": {
                          "type": "string",
                          "nullable": true
                        },
                        "file": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg",
                              "description": "имя блока"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор",
                                  "description": "имя блока"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            }
                          }
                        },
                        "text": {
                          "type": "string",
                          "nullable": true
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Видео рекламного слайдера",
                              "description": "имя блока"
                            }
                          }
                        },
                        "children": {
                          "type": "array",
                          "items": {}
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2025-01-23T17:59:03.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Блоки/#block-create"
        },
        "description": "#### Параметры запроса - `applications/{id}` — ID приложения из списка приложений - `block_type_id` — ID типа блока из справочника - `name` — имя блока - `link` — URL ссылка. Обязателен, если `block_type_id` = 4 или `block_type_id` = 5 - `avatar_id` — ID аватара, загруженного при помощи запроса добавления файла - `file_id` — ID прикрепляемого файла, загруженного при помощи запроса добавления файла. Обязателен, если `block_type_id` = 3 - `text` — текстовый контент блока. Обязателен, если `block_type_id` = 1 или `block_type_id` = 2 - `parent_id` — ID родительского блока из запроса получения спис",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "block_type_id": {
                    "type": "integer",
                    "example": 3,
                    "description": "ID типа блока из справочника"
                  },
                  "name": {
                    "type": "string",
                    "example": "Параметр 1",
                    "description": "имя блока"
                  },
                  "link": {
                    "type": "string",
                    "nullable": true
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID аватара, загруженного при помощи запроса добавления файла"
                  },
                  "file_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID прикрепляемого файла, загруженного при помощи запроса добавления файла. Обязателен, если block_type_id = 3"
                  },
                  "text": {
                    "type": "string",
                    "nullable": true
                  },
                  "parent_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID родительского блока из запроса получения списка блоков"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/applications/{id}/blocks/{id}": {
      "get": {
        "summary": "Получение выбранного блока",
        "operationId": "block-show",
        "tags": [
          "ERP / Блоки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "block": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 10,
                          "description": "первичный ключ (номер блока)"
                        },
                        "code": {
                          "type": "integer",
                          "example": 3,
                          "description": "код блока"
                        },
                        "name": {
                          "type": "string",
                          "example": "Третий блок",
                          "description": "название блока"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2827,
                              "description": "первичный ключ (номер блока)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Da Chirillo - Колбасы и деликатесы премиум качества.png",
                              "description": "название блока"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "первичный ключ (номер блока)"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор",
                                  "description": "название блока"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "description": "объект с информацией об аватаре"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "description": "дата добавления в систему"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/IcnkXX2tyYQcFtuNOYEsbrgRX13T1IVkeyTTHxqH.png"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-01-27T14:17:14.000000Z",
                              "description": "дата добавления в систему"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-01-27T14:17:14.000000Z"
                            }
                          },
                          "description": "объект с информацией об аватаре"
                        },
                        "block_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3,
                              "description": "первичный ключ (номер блока)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Картинка",
                              "description": "название блока"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/api//storage/uploads/image-profile-2.svg",
                              "description": "объект с информацией об аватаре"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-01-23T09:47:38.000000Z",
                              "description": "дата добавления в систему"
                            }
                          },
                          "description": "объект с информацией о типе блока"
                        },
                        "link": {
                          "type": "string",
                          "nullable": true
                        },
                        "file": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2827,
                              "description": "первичный ключ (номер блока)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Da Chirillo - Колбасы и деликатесы премиум качества.png",
                              "description": "название блока"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "первичный ключ (номер блока)"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор",
                                  "description": "название блока"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg",
                                  "description": "объект с информацией об аватаре"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "description": "дата добавления в систему"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/IcnkXX2tyYQcFtuNOYEsbrgRX13T1IVkeyTTHxqH.png"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-01-27T14:17:14.000000Z",
                              "description": "дата добавления в систему"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-01-27T14:17:14.000000Z"
                            }
                          },
                          "description": "объект с информацией о прикреплённом файле"
                        },
                        "text": {
                          "type": "string",
                          "nullable": true
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 9,
                              "description": "первичный ключ (номер блока)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Второй блок",
                              "description": "название блока"
                            }
                          }
                        },
                        "children": {
                          "type": "array",
                          "items": {}
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2025-01-27T14:17:14.000000Z",
                          "description": "дата добавления в систему"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Блоки/#block-show"
        },
        "description": "#### Параметры запроса - `applications/{id}` — ID приложения из списка приложений"
      },
      "put": {
        "summary": "Редактирование блока",
        "operationId": "block-update",
        "tags": [
          "ERP / Блоки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "block": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 2
                        },
                        "code": {
                          "type": "integer",
                          "example": 10,
                          "description": "код блока"
                        },
                        "name": {
                          "type": "string",
                          "example": "Видео рекламного слайдера",
                          "description": "имя блока"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.png",
                              "description": "имя блока"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор",
                                  "description": "имя блока"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/igbcW8dPebcrVfnbC2A2Zptf1nruFcF8Nmf8sVTG.png"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:11:00.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:11:00.000000Z"
                            }
                          }
                        },
                        "block_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3
                            },
                            "name": {
                              "type": "string",
                              "example": "Картинка",
                              "description": "имя блока"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/api//storage/uploads/image-profile-2.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2025-01-23T09:47:38.000000Z"
                            }
                          }
                        },
                        "link": {
                          "type": "string",
                          "nullable": true
                        },
                        "file": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.png",
                              "description": "имя блока"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор",
                                  "description": "имя блока"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://api.gigma.ru/storage/uploads/default.svg"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/igbcW8dPebcrVfnbC2A2Zptf1nruFcF8Nmf8sVTG.png"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:11:00.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:11:00.000000Z"
                            }
                          }
                        },
                        "text": {
                          "type": "string",
                          "nullable": true
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Видео рекламного слайдера",
                              "description": "имя блока"
                            }
                          }
                        },
                        "children": {
                          "type": "array",
                          "items": {}
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2025-01-23T17:44:00.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Блоки/#block-update"
        },
        "description": "#### Параметры запроса - `applications/{id}` — ID приложения из списка приложений - `block_type_id` — ID типа блока из справочника - `name` — имя блока - `code` — код блока - `link` — URL ссылка. Обязателен, если `block_type_id` = 4 или `block_type_id` = 5 - `avatar_id` — ID аватара, загруженного при помощи запроса добавления файла. Обязателен, если `block_type_id` = 3 - `file_id` — ID прикрепляемого файла, загруженного при помощи запроса добавления файла. Обязателен, если `block_type_id` = 3 - `text` — текстовый контент блока. Обязателен, если `block_type_id` = 1 или `block_type_id` = 2 - `pa",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "block_type_id": {
                    "type": "integer",
                    "example": 3,
                    "description": "ID типа блока из справочника"
                  },
                  "name": {
                    "type": "string",
                    "example": "Видео рекламного слайдера",
                    "description": "имя блока"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "ID аватара, загруженного при помощи запроса добавления файла. Обязателен, если block_type_id = 3"
                  },
                  "file_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "ID прикрепляемого файла, загруженного при помощи запроса добавления файла. Обязателен, если block_type_id = 3"
                  },
                  "parent_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID родительского блока из запроса получения списка блоков"
                  },
                  "code": {
                    "type": "integer",
                    "example": 10,
                    "description": "код блока"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление блока",
        "operationId": "block-delete",
        "tags": [
          "ERP / Блоки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Блоки/#block-delete"
        },
        "description": "#### Параметры запроса - `applications/{id}` — ID приложения из списка приложений"
      }
    },
    "/api/applications/{id}/blocks/{id}/history": {
      "get": {
        "summary": "Получение истории изменений по блоку",
        "operationId": "block-history",
        "tags": [
          "ERP / Блоки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/LaravelPaginator"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 2174,
                                "description": "первичный ключ"
                              },
                              "icon": {
                                "type": "string",
                                "example": "check",
                                "description": "иконка"
                              },
                              "color": {
                                "type": "string",
                                "example": "primary",
                                "description": "цвет"
                              },
                              "title": {
                                "type": "string",
                                "example": "Создание",
                                "description": "заголовок"
                              },
                              "description": {
                                "type": "string",
                                "example": "Создание: Воронова София",
                                "description": "описание"
                              },
                              "datetime": {
                                "type": "string",
                                "example": "23.01.2025 15:57",
                                "description": "дата выполнения действия"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Блоки/#block-history"
        },
        "description": "#### Параметры запроса - `applications/{id}` — ID приложения из списка приложений"
      }
    },
    "/api/orders/calculator": {
      "post": {
        "summary": "Расчёт стоимости товара",
        "operationId": "calculator",
        "tags": [
          "ERP / Вспомогательные запросы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "price": {
                      "type": "integer",
                      "example": 1414,
                      "description": "итоговая стоимость с учётом наценки и скидки"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Вспомогательные запросы/#calculator"
        },
        "description": "Считает итоговую цену с учётом наценки и скидки. Не сохраняет ничего в базе.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "price": {
                    "type": "integer",
                    "example": 1000,
                    "description": "итоговая стоимость с учётом наценки и скидки"
                  },
                  "markup": {
                    "type": "integer",
                    "example": 40,
                    "description": "наценка в процентах (обязательно, 0 если без наценки)"
                  },
                  "discount": {
                    "type": "integer",
                    "example": 1,
                    "description": "скидка в процентах (обязательно, 0 если без скидки)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/search_address": {
      "post": {
        "summary": "Поиск адреса",
        "operationId": "search-address",
        "tags": [
          "ERP / Вспомогательные запросы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "addresses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "г. Новосибирск, ул. Новогодняя, д. 20"
                          },
                          "value": {
                            "type": "string",
                            "example": "630073, г. Новосибирск, Новогодняя ул., д. 20"
                          }
                        }
                      }
                    },
                    "addressesCount": {
                      "type": "integer",
                      "example": 2,
                      "description": "количество результатов"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Вспомогательные запросы/#search-address"
        },
        "description": "Подсказки адресов для autocomplete (как DaData). Возвращает список вариантов, сопоставимых с введённой строкой.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "example": "Новогодняя 20",
                    "description": "поисковая строка"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/search_bank": {
      "post": {
        "summary": "Поиск банка",
        "operationId": "search-bank",
        "tags": [
          "ERP / Вспомогательные запросы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "banks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "ПАО Сбербанк"
                          },
                          "bik": {
                            "type": "string",
                            "example": "044525225"
                          },
                          "kpp": {
                            "type": "string",
                            "example": "773601001"
                          },
                          "payment_account": {
                            "type": "string",
                            "example": ""
                          },
                          "address": {
                            "type": "string",
                            "example": "117997, г. Москва, ул. Вавилова, д. 19"
                          }
                        }
                      }
                    },
                    "banksCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "количество результатов"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Вспомогательные запросы/#search-bank"
        },
        "description": "Подсказки банковских реквизитов по БИК или названию. Возвращает шаблонные `IBankRequisite` для авто-заполнения формы.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "example": "Сбер",
                    "description": "поисковая строка (БИК или название банка)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/search_company": {
      "post": {
        "summary": "Поиск компании",
        "operationId": "search-company",
        "tags": [
          "ERP / Вспомогательные запросы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "companies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string",
                            "example": "ООО \"АЙТЕКО\""
                          },
                          "inn": {
                            "type": "string",
                            "example": "5403057658"
                          },
                          "orgn": {
                            "type": "string",
                            "example": "1185476049158"
                          },
                          "legal_address": {
                            "type": "string",
                            "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26"
                          },
                          "kpp": {
                            "type": "string",
                            "example": "540301001"
                          },
                          "head": {
                            "type": "string",
                            "example": "Снегирёв Алексей Игоревич"
                          },
                          "registration_date": {
                            "type": "string",
                            "format": "date",
                            "example": "2020-04-02"
                          }
                        }
                      }
                    },
                    "companiesCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "количество результатов"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Вспомогательные запросы/#search-company"
        },
        "description": "Подсказки юрлиц по названию, ИНН или ОГРН. Используется в формах создания компании-контрагента и компании-бизнеса.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "field": {
                    "type": "string",
                    "example": "inn",
                    "description": "по какому полю искать: name | inn | ogrn"
                  },
                  "query": {
                    "type": "string",
                    "example": "5403057658",
                    "description": "поисковая строка"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/cities": {
      "get": {
        "summary": "Получение списка городов",
        "operationId": "list-cities",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cities": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Москва",
                            "description": "город"
                          },
                          "avatar": {
                            "type": "string",
                            "format": "uri",
                            "example": "http://localhost:8000/storage/uploads/default.svg"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-04-19T09:18:41.000000Z",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "citiesCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-cities"
        },
        "description": "#### Параметры запроса - `query` — поисковая строка"
      }
    },
    "/api/cities/{id}": {
      "get": {
        "summary": "Получение выбранного города",
        "operationId": "get-city",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "city": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Москва",
                          "description": "город"
                        },
                        "avatar": {
                          "type": "string",
                          "format": "uri",
                          "example": "http://localhost:8000/storage/uploads/default.svg"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-04-19T09:18:41.000000Z",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-city"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/search_nomenclature": {
      "post": {
        "summary": "Поиск номенклатуры",
        "operationId": "search-nomenclature",
        "tags": [
          "ERP / Вспомогательные запросы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Вспомогательные запросы/#search-nomenclature"
        },
        "description": "Полнотекстовый поиск по номенклатуре через DaData. Возвращает список совпадений по названию.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "example": "крем",
                    "description": "поисковая строка"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/tables/tasks": {
      "get": {
        "summary": "Получение списка задач (табличное представление)",
        "operationId": "tasks-table",
        "tags": [
          "ERP / Задачи"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TablesEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "tasks": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 12
                              },
                              "name": {
                                "type": "string",
                                "example": "Позвонить клиенту"
                              },
                              "executor": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://api.gigma.ru/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Иванов Алексей"
                                  }
                                }
                              },
                              "status": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://api.gigma.ru/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "В работе"
                                  }
                                }
                              },
                              "started_at": {
                                "type": "string",
                                "example": "16.05.2026 09:00"
                              },
                              "finished_at": {
                                "type": "string",
                                "example": "16.05.2026 18:00"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "tasks"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Задачи/#tasks-table"
        },
        "description": "#### Параметры запроса - `query` — поисковая строка (min: 3 символа) - `date_from` — фильтр по дате (от) - `date_to` — фильтр по дате (до) - `creator_id[]` — массив ID создателей задачи - `executor_id[]` — массив ID исполнителей задачи - `order_id[]` — массив ID заказов - `task_status_id[]` — массив ID статусов (`GET /api/task_statuses`): 1=В работе, 2=Просрочена, 3=Выполнена - `page` — текущая страница - `per_page` — кол-во элементов на странице"
      }
    },
    "/api/tasks": {
      "get": {
        "summary": "Получение списка задач (JSON)",
        "operationId": "tasks-list",
        "tags": [
          "ERP / Задачи"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tasks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 12
                          },
                          "name": {
                            "type": "string",
                            "example": "Позвонить клиенту"
                          },
                          "started_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2026-05-16T09:00:00.000000Z"
                          },
                          "finished_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2026-05-16T18:00:00.000000Z"
                          },
                          "create_everyday": {
                            "type": "boolean",
                            "example": false
                          },
                          "duration": {
                            "type": "string",
                            "example": "9 ч"
                          },
                          "executor": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 5
                              },
                              "name": {
                                "type": "string",
                                "example": "Иванов Алексей"
                              }
                            }
                          },
                          "creator": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "Полищук Артём"
                              }
                            }
                          },
                          "status": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "В работе"
                              }
                            }
                          },
                          "order": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 42
                              },
                              "name": {
                                "type": "string",
                                "example": "Заказ №42"
                              }
                            }
                          },
                          "object": {
                            "type": "string",
                            "nullable": true
                          },
                          "notifications": {
                            "type": "array",
                            "items": {}
                          },
                          "stage": {
                            "type": "string",
                            "nullable": true
                          },
                          "progress": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    },
                    "tasksCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Задачи/#tasks-list"
        },
        "description": "#### Параметры запроса Те же фильтры, что и в табличном представлении."
      },
      "post": {
        "summary": "Создание задачи",
        "operationId": "task-create",
        "tags": [
          "ERP / Задачи"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "task": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 13
                        },
                        "name": {
                          "type": "string",
                          "example": "Позвонить клиенту",
                          "description": "название задачи"
                        },
                        "started_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-05-17T09:00:00.000000Z",
                          "description": "дата/время начала, ISO 8601"
                        },
                        "finished_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-05-17T18:00:00.000000Z",
                          "description": "дата/время срока, ISO 8601, должна быть позже started_at"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-05-17T08:30:00.000000Z"
                        },
                        "create_everyday": {
                          "type": "boolean",
                          "example": false,
                          "description": "повторять задачу ежедневно"
                        },
                        "duration": {
                          "type": "string",
                          "example": "9 ч"
                        },
                        "executor": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 5
                            },
                            "name": {
                              "type": "string",
                              "example": "Иванов Алексей",
                              "description": "название задачи"
                            }
                          }
                        },
                        "creator": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём",
                              "description": "название задачи"
                            }
                          }
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "В работе",
                              "description": "название задачи"
                            }
                          }
                        },
                        "order": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 42
                            },
                            "name": {
                              "type": "string",
                              "example": "Заказ №42",
                              "description": "название задачи"
                            }
                          }
                        },
                        "object": {
                          "type": "string",
                          "nullable": true
                        },
                        "notifications": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "Технический",
                                "description": "название задачи"
                              }
                            }
                          }
                        },
                        "stage": {
                          "type": "string",
                          "nullable": true
                        },
                        "progress": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Задачи/#task-create"
        },
        "description": "#### Параметры запроса - `name` *(string, обязательно)* — название задачи - `started_at` *(datetime, обязательно)* — дата/время начала, ISO 8601 - `finished_at` *(datetime, обязательно)* — дата/время срока, ISO 8601, должна быть позже `started_at` - `executor_id` *(int, обязательно)* — ID исполнителя (`GET /api/users`) - `order_id` *(int, обязательно)* — ID заказа (`GET /api/orders`) - `object` *(string, опционально)* — произвольная метка объекта - `create_everyday` *(boolean, опционально)* — повторять задачу ежедневно - `notifications` *(int[], опционально)* — массив ID отделов для уведомлени",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Позвонить клиенту",
                    "description": "название задачи"
                  },
                  "started_at": {
                    "type": "string",
                    "example": "2026-05-17 09:00:00",
                    "description": "дата/время начала, ISO 8601"
                  },
                  "finished_at": {
                    "type": "string",
                    "example": "2026-05-17 18:00:00",
                    "description": "дата/время срока, ISO 8601, должна быть позже started_at"
                  },
                  "executor_id": {
                    "type": "integer",
                    "example": 5,
                    "description": "ID исполнителя (GET /api/users)"
                  },
                  "order_id": {
                    "type": "integer",
                    "example": 42,
                    "description": "ID заказа (GET /api/orders)"
                  },
                  "create_everyday": {
                    "type": "boolean",
                    "example": false,
                    "description": "повторять задачу ежедневно"
                  },
                  "notifications": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                },
                "required": [
                  "name",
                  "started_at",
                  "finished_at",
                  "executor_id",
                  "order_id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/tasks/{id}": {
      "get": {
        "summary": "Получение выбранной задачи",
        "operationId": "task-show",
        "tags": [
          "ERP / Задачи"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "task": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 12,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Позвонить клиенту",
                          "description": "название задачи"
                        },
                        "started_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-05-16T09:00:00.000000Z",
                          "description": "дата/время начала"
                        },
                        "finished_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-05-16T18:00:00.000000Z",
                          "description": "дата/время срока выполнения"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-05-16T08:00:00.000000Z",
                          "description": "дата/время создания записи"
                        },
                        "create_everyday": {
                          "type": "boolean",
                          "example": false,
                          "description": "повторять каждый день (boolean)"
                        },
                        "duration": {
                          "type": "string",
                          "example": "9 ч",
                          "description": "строка длительности (9 ч)"
                        },
                        "executor": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 5,
                              "description": "первичный ключ"
                            },
                            "name": {
                              "type": "string",
                              "example": "Иванов Алексей",
                              "description": "название задачи"
                            }
                          },
                          "description": "объект исполнителя"
                        },
                        "creator": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ"
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём",
                              "description": "название задачи"
                            }
                          },
                          "description": "объект создателя задачи"
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ"
                            },
                            "name": {
                              "type": "string",
                              "example": "В работе",
                              "description": "название задачи"
                            }
                          },
                          "description": "объект статуса (GET /api/task_statuses)"
                        },
                        "order": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 42,
                              "description": "первичный ключ"
                            },
                            "name": {
                              "type": "string",
                              "example": "Заказ №42",
                              "description": "название задачи"
                            }
                          },
                          "description": "объект связанного заказа"
                        },
                        "object": {
                          "type": "string",
                          "nullable": true
                        },
                        "notifications": {
                          "type": "array",
                          "items": {}
                        },
                        "stage": {
                          "type": "string",
                          "nullable": true
                        },
                        "progress": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Задачи/#task-show"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      },
      "put": {
        "summary": "Редактирование задачи",
        "operationId": "task-update",
        "tags": [
          "ERP / Задачи"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Задачи/#task-update"
        },
        "description": "#### Параметры запроса Все поля опциональны. Можно обновить любое из них. - `task_status_id` *(int)* — ID нового статуса: 1=В работе, 2=Просрочена, 3=Выполнена - `name` *(string)* — название задачи - `started_at` *(datetime)* — дата/время начала, ISO 8601 - `finished_at` *(datetime)* — дата/время срока, ISO 8601, после `started_at` - `executor_id` *(int)* — ID исполнителя - `order_id` *(int)* — ID заказа - `object` *(string)* — метка объекта - `create_everyday` *(boolean)* — ежедневное повторение - `notifications` *(int[])* — массив ID отделов",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "task_status_id": {
                    "type": "integer",
                    "example": 3,
                    "description": "ID статуса из соответствующего справочника. Названия стабильны (см. /enums#order-statuses), ID могут различаться между средами — всегда fetch live. Получить актуальные значения: `GET /api/order_statuses (или task/call equivalent)`"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/tables/orders": {
      "get": {
        "summary": "Получение списка заказов (табличное представление)",
        "operationId": "orders-table",
        "tags": [
          "ERP / Заказы"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TablesEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "orders": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 16,
                                "description": "первичный ключ (номер заказа)"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "27.07.2024 12:43",
                                "description": "дата/время создания заказа"
                              },
                              "branch": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000//storage/uploads/9qzh2GCaYpRpaxXnql0JZYpIesu3qlvQLV2OBhcN.png"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Продажа косметики"
                                  }
                                },
                                "description": "объект с информацией о бизнесе"
                              },
                              "counterparty": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": " "
                                  }
                                },
                                "description": "объект с информацией о клиенте (контрагенте)"
                              },
                              "object": {
                                "type": "string",
                                "nullable": true
                              },
                              "source": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000//storage/uploads/uPINajA2l2XPB44ojjTEd88wRKxRwsWXIlrgg2iX.jpg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Сей момент"
                                  }
                                },
                                "description": "объект с информацией об источнике заказа"
                              },
                              "manager": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Полищук Артём"
                                  }
                                },
                                "description": "объект с информацией о менеджере"
                              },
                              "sales_channel": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000//storage/uploads/uPINajA2l2XPB44ojjTEd88wRKxRwsWXIlrgg2iX.jpg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Сей момент"
                                  }
                                },
                                "description": "объект с информацией о канале продаж"
                              },
                              "promotion": {
                                "type": "string",
                                "nullable": true
                              },
                              "price": {
                                "type": "string",
                                "nullable": true
                              },
                              "status": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "В сборке"
                                  }
                                },
                                "description": "объект с информацией о статусе заказа"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "orders"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Заказы/#orders-table"
        },
        "description": "#### Параметры запроса - `order_status_id` — массив ID статусов заказа из справочника - `application_id` — массив ID источников заказа - `department_id` — массив ID отделов - `hierarchy` — `all` для получения всех заказов, `my` — только своих - `page` — текущая страница (для пагинации) - `per_page` — кол-во элементов на странице - `query` — поисковая строка - `date_from` — \"дата с...\" (от даты добавления в систему) - `date_to` — \"дата по...\" (от даты добавления в систему)",
        "x-used-in": [
          "17.2",
          "17.4"
        ]
      }
    },
    "/api/orders/{id}": {
      "get": {
        "summary": "Получение выбранного заказа",
        "operationId": "order-show",
        "tags": [
          "ERP / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 17,
                          "description": "первичный ключ (номер заказа)"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 763,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "ai monsters.jpg",
                              "description": "произвольное название заказа"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 2,
                                  "description": "первичный ключ (номер заказа)"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Аватар",
                                  "description": "произвольное название заказа"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "http://localhost:8000/storage/uploads/default.svg",
                                  "description": "объект с информацией о фотографии заказа"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/AsQsvs5VPbIo6YkYlnlQel39T7RS01zYD2NPlYYv.jpg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-08-01T15:55:09.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-08-01T15:55:09.000000Z"
                            }
                          },
                          "description": "объект с информацией о фотографии заказа"
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "В сборке",
                              "description": "произвольное название заказа"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg",
                              "description": "объект с информацией о фотографии заказа"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-27T07:00:46.000000Z"
                            }
                          },
                          "description": "объект с информацией о статусе заказа"
                        },
                        "invoice_number": {
                          "type": "string",
                          "nullable": true
                        },
                        "invoice_start_date": {
                          "type": "string",
                          "nullable": true
                        },
                        "invoice_end_date": {
                          "type": "string",
                          "nullable": true
                        },
                        "application": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Сей момент",
                              "description": "произвольное название заказа"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg",
                              "description": "объект с информацией о фотографии заказа"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-08-01T09:20:01.000000Z"
                            }
                          },
                          "description": "объект с информацией о приложении"
                        },
                        "counterparty": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 56,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "ООО \"РОГА И КОПЫТА\"",
                              "description": "произвольное название заказа"
                            }
                          },
                          "description": "объект с информацией о контрагенте"
                        },
                        "delivery_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Самовывоз",
                              "description": "произвольное название заказа"
                            },
                            "price": {
                              "type": "string",
                              "format": "decimal",
                              "example": "0.00",
                              "description": "итоговая цена заказа"
                            },
                            "is_active": {
                              "type": "integer",
                              "example": 1
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-05-13T05:26:37.000000Z"
                            }
                          },
                          "description": "объект с информацией о способе доставки заказа"
                        },
                        "address": {
                          "type": "string",
                          "example": "357100, Ставропольский край, г Невинномысск",
                          "description": "адрес"
                        },
                        "branch": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 15,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Торговля косметикой",
                              "description": "произвольное название заказа"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000//storage/uploads/b9t9B4Y4Fq6dAKvgVW2vhzFJ12ZrgRgvVHdMnfjt.png",
                              "description": "объект с информацией о фотографии заказа"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-08-01T07:50:59.000000Z"
                            }
                          },
                          "description": "объект с информацией о бизнесе"
                        },
                        "object": {
                          "type": "string",
                          "nullable": true
                        },
                        "source": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Сей момент",
                              "description": "произвольное название заказа"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg",
                              "description": "объект с информацией о фотографии заказа"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-08-01T09:20:01.000000Z"
                            }
                          },
                          "description": "объект с информацией об источнике заказа"
                        },
                        "sales_channel": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Канал продаж 1",
                              "description": "произвольное название заказа"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg",
                              "description": "объект с информацией о фотографии заказа"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-27T07:00:46.000000Z"
                            }
                          },
                          "description": "объект с информацией о канале продаж"
                        },
                        "manager": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Артём"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Полищук"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Николаевич"
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём",
                              "description": "произвольное название заказа"
                            }
                          },
                          "description": "объект с информацией о менеджере"
                        },
                        "promotion": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ (номер заказа)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Улётное лето",
                              "description": "произвольное название заказа"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000//storage/uploads/default_brand.png",
                              "description": "объект с информацией о фотографии заказа"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-07-28T16:59:24.000000Z"
                            }
                          },
                          "description": "объект с информацией о промоакции"
                        },
                        "contract": {
                          "type": "string",
                          "nullable": true
                        },
                        "contract_number": {
                          "type": "string",
                          "nullable": true
                        },
                        "contract_start_date": {
                          "type": "string",
                          "nullable": true
                        },
                        "contract_end_date": {
                          "type": "string",
                          "nullable": true
                        },
                        "name": {
                          "type": "string",
                          "nullable": true
                        },
                        "promo_code": {
                          "type": "string",
                          "nullable": true
                        },
                        "original_price": {
                          "type": "string",
                          "nullable": true
                        },
                        "product_discount_amount": {
                          "type": "string",
                          "nullable": true
                        },
                        "promo_discount_amount": {
                          "type": "string",
                          "nullable": true
                        },
                        "total_discount_amount": {
                          "type": "string",
                          "nullable": true
                        },
                        "final_price": {
                          "type": "string",
                          "nullable": true
                        },
                        "refund_request": {
                          "type": "object",
                          "properties": {
                            "requested_at": {
                              "type": "string",
                              "nullable": true
                            },
                            "requested_by_user_id": {
                              "type": "string",
                              "nullable": true
                            },
                            "comment": {
                              "type": "string",
                              "nullable": true
                            },
                            "email_sent_at": {
                              "type": "string",
                              "nullable": true
                            }
                          },
                          "description": "объект с информацией о запросе возврата: requested_at, requested_by_user_id, comment, email_sent_at"
                        },
                        "ticket": {
                          "type": "object",
                          "properties": {
                            "redeem_token": {
                              "type": "string",
                              "nullable": true
                            },
                            "redeemed_count": {
                              "type": "string",
                              "nullable": true
                            },
                            "total_tickets": {
                              "type": "string",
                              "nullable": true
                            },
                            "last_redeemed_at": {
                              "type": "string",
                              "nullable": true
                            },
                            "last_redeemed_by": {
                              "type": "string",
                              "nullable": true
                            }
                          },
                          "description": "поля гашения билета (только для авторизованных с доступом к заказу): redeem_token, redeemed_count, total_tickets, last_redeemed_at, last_redeemed_by"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Заказы/#order-show"
        },
        "description": "#### Параметры запроса Параметры не передаются.",
        "x-used-in": [
          "17.4"
        ]
      },
      "put": {
        "summary": "Редактирование заказа",
        "operationId": "order-update",
        "tags": [
          "ERP / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Заказы/#order-update"
        },
        "description": "#### Параметры запроса - `avatar_id` — ID фотографии склада - `counterparty_id` — ID контрагента - `delivery_type_id` — ID типа доставки - `address` — адрес заказа - `shop_id` — ID магазина. Рекомендуется использовать с параметром `branch_id` - `branch_id` — ID бизнеса - `object_id` — ID объекта - `application_id` — ID источника - `sales_channel_id` — ID канала продаж - `manager_id` — ID менеджера - `promotion_id` — ID промоакции - `contract_number` — номер договора - `contract_id` — ID договора - `contract_start_date` — дата начала действия договора - `contract_end_date` — дата окончания дейс",
        "x-used-in": [
          "17.4"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID фотографии склада"
                  },
                  "counterparty_id": {
                    "type": "integer",
                    "example": 3,
                    "description": "ID контрагента"
                  },
                  "delivery_type_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Способ доставки. Подтипы — /api/delivery_types/{id}/subtypes Получить актуальные значения: `GET /api/delivery_types`"
                  },
                  "address": {
                    "type": "string",
                    "example": "г Москва, пл Комсомольская, д 20",
                    "description": "адрес заказа"
                  },
                  "branch_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Бизнес/филиал. **НЕ** /api/businesses Получить актуальные значения: `GET /api/branches`"
                  },
                  "object_id": {
                    "type": "string",
                    "nullable": true
                  },
                  "application_id": {
                    "type": "integer",
                    "example": 10,
                    "description": "ID источника"
                  },
                  "sales_channel_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Канал продаж Получить актуальные значения: `GET /api/sales_channels`"
                  },
                  "manager_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Менеджер (упрощённый объект). Для полного поиска — GET /api/users?query=… Получить актуальные значения: `GET /api/managers`"
                  },
                  "promotion_id": {
                    "type": "string",
                    "nullable": true
                  },
                  "contract_number": {
                    "type": "string",
                    "example": "А-35/2024",
                    "description": "номер договора"
                  },
                  "contract_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID договора"
                  },
                  "contract_start_date": {
                    "type": "string",
                    "format": "date",
                    "example": "2024-01-11",
                    "description": "дата начала действия договора"
                  },
                  "contract_end_date": {
                    "type": "string",
                    "format": "date",
                    "example": "2024-01-11",
                    "description": "дата окончания действия договора"
                  },
                  "invoice_number": {
                    "type": "string",
                    "example": "123123",
                    "description": "номер счёта"
                  },
                  "invoice_start_date": {
                    "type": "string",
                    "format": "date",
                    "example": "2024-01-11",
                    "description": "дата счёта (дата создания счёта)"
                  },
                  "invoice_end_date": {
                    "type": "string",
                    "format": "date",
                    "example": "2024-01-11",
                    "description": "дата окончания срока действия счёта"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление заказа ⚠ backend bug",
        "operationId": "order-delete",
        "tags": [
          "ERP / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Заказы/#order-delete"
        },
        "description": "⚠ **Backend bug:** endpoint стабильно возвращает `500`. Удаление заказа через API сейчас не работает — используй смену статуса в `IS_CANCELED` (6) через `PUT /api/orders/{id}` с `{ \"order_status_id\": 6 }`."
      }
    },
    "/api/orders": {
      "post": {
        "summary": "Добавление заказа",
        "operationId": "order-create",
        "tags": [
          "ERP / Заказы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 17
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 763
                            },
                            "name": {
                              "type": "string",
                              "example": "ai monsters.jpg"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Аватар"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "http://localhost:8000/storage/uploads/default.svg"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/AsQsvs5VPbIo6YkYlnlQel39T7RS01zYD2NPlYYv.jpg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-08-01T15:55:09.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-08-01T15:55:09.000000Z"
                            }
                          }
                        },
                        "status": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "В сборке"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-27T07:00:46.000000Z"
                            }
                          }
                        },
                        "invoice_number": {
                          "type": "string",
                          "nullable": true
                        },
                        "invoice_start_date": {
                          "type": "string",
                          "nullable": true
                        },
                        "invoice_end_date": {
                          "type": "string",
                          "nullable": true
                        },
                        "application": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14
                            },
                            "name": {
                              "type": "string",
                              "example": "Сей момент"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-08-01T09:20:01.000000Z"
                            }
                          }
                        },
                        "counterparty": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 56
                            },
                            "name": {
                              "type": "string",
                              "example": "ООО \"РОГА И КОПЫТА\""
                            }
                          }
                        },
                        "delivery_type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Самовывоз"
                            },
                            "price": {
                              "type": "string",
                              "format": "decimal",
                              "example": "0.00"
                            },
                            "is_active": {
                              "type": "integer",
                              "example": 1
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-05-13T05:26:37.000000Z"
                            }
                          }
                        },
                        "address": {
                          "type": "string",
                          "example": "357100, Ставропольский край, г Невинномысск",
                          "description": "адрес заказа (min:3)"
                        },
                        "shop": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "photo": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "logo.svg"
                                },
                                "type": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "integer",
                                      "example": 1
                                    },
                                    "name": {
                                      "type": "string",
                                      "example": "Трудовой договор"
                                    },
                                    "avatar": {
                                      "type": "string",
                                      "format": "uri",
                                      "example": "http://localhost:8000/storage/uploads/default.svg"
                                    },
                                    "created_at": {
                                      "type": "string",
                                      "format": "date-time",
                                      "example": "2024-03-27T07:00:46.000000Z"
                                    }
                                  }
                                },
                                "path": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "http://localhost:8000/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-04-14T20:04:32.000000Z"
                                },
                                "updated_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-04-14T20:04:32.000000Z"
                                }
                              }
                            },
                            "name": {
                              "type": "string",
                              "example": "Центральный"
                            },
                            "address": {
                              "type": "string",
                              "example": "г. Ростов-на-Дону, ул. Ленина, 1",
                              "description": "адрес заказа (min:3)"
                            },
                            "phone": {
                              "type": "string",
                              "example": "+79851234567"
                            },
                            "schedule": {
                              "type": "string",
                              "example": "ПН-ПТ, с 10:00 до 18:00"
                            }
                          }
                        },
                        "branch": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 15
                            },
                            "name": {
                              "type": "string",
                              "example": "Торговля косметикой"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000//storage/uploads/b9t9B4Y4Fq6dAKvgVW2vhzFJ12ZrgRgvVHdMnfjt.png"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-08-01T07:50:59.000000Z"
                            }
                          }
                        },
                        "object": {
                          "type": "string",
                          "nullable": true
                        },
                        "source": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14
                            },
                            "name": {
                              "type": "string",
                              "example": "Сей момент"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-08-01T09:20:01.000000Z"
                            }
                          }
                        },
                        "sales_channel": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Канал продаж 1"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-27T07:00:46.000000Z"
                            }
                          }
                        },
                        "manager": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Артём"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Полищук"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Николаевич"
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём"
                            }
                          }
                        },
                        "promotion": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Улётное лето"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000//storage/uploads/default_brand.png"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-07-28T16:59:24.000000Z"
                            }
                          }
                        },
                        "contract": {
                          "type": "string",
                          "nullable": true
                        },
                        "contract_number": {
                          "type": "string",
                          "nullable": true
                        },
                        "contract_start_date": {
                          "type": "string",
                          "nullable": true
                        },
                        "contract_end_date": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Заказы/#order-create"
        },
        "description": "#### Параметры запроса ⚠ Реальный minimum (`Order/StoreRequest` в `itecho-erp-backend`): только `counterparty_id` + `manager_id`. Остальные поля опциональны на уровне валидатора. - `counterparty_id` *(int, обязательно)* — ID контрагента (`GET /api/counterparties`) - `manager_id` *(int, обязательно)* — ID менеджера (`GET /api/managers`) - `avatar_id` *(int, опционально)* — ID фотографии (`GET /api/files`) - `delivery_type_id` *(int, опционально)* — ID типа доставки (`GET /api/delivery_types`) - `address` *(string, опционально)* — адрес заказа (min:3) - `shop_id` *(int, опционально)* — ID магази",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID фотографии (GET /api/files)"
                  },
                  "counterparty_id": {
                    "type": "integer",
                    "example": 3,
                    "description": "ID контрагента (GET /api/counterparties)"
                  },
                  "delivery_type_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Способ доставки. Подтипы — /api/delivery_types/{id}/subtypes Получить актуальные значения: `GET /api/delivery_types`"
                  },
                  "address": {
                    "type": "string",
                    "example": "г Москва, пл Комсомольская, д 20",
                    "description": "адрес заказа (min:3)"
                  },
                  "branch_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Бизнес/филиал. **НЕ** /api/businesses Получить актуальные значения: `GET /api/branches`"
                  },
                  "shop_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID магазина (GET /api/shops). Рекомендуется с branch_id"
                  },
                  "object_id": {
                    "type": "string",
                    "nullable": true
                  },
                  "application_id": {
                    "type": "integer",
                    "example": 10,
                    "description": "ID источника (E-Commerce application)"
                  },
                  "sales_channel_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Канал продаж Получить актуальные значения: `GET /api/sales_channels`"
                  },
                  "manager_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Менеджер (упрощённый объект). Для полного поиска — GET /api/users?query=… Получить актуальные значения: `GET /api/managers`"
                  },
                  "promotion_id": {
                    "type": "string",
                    "nullable": true
                  },
                  "contract_number": {
                    "type": "string",
                    "example": "А-35/2024",
                    "description": "номер договора"
                  },
                  "contract_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID файла договора (GET /api/files)"
                  },
                  "contract_start_date": {
                    "type": "string",
                    "format": "date",
                    "example": "2024-01-11",
                    "description": "YYYY-MM-DD"
                  },
                  "contract_end_date": {
                    "type": "string",
                    "format": "date",
                    "example": "2024-01-11",
                    "description": "YYYY-MM-DD"
                  },
                  "invoice_number": {
                    "type": "string",
                    "example": "123123",
                    "description": "номер счёта"
                  },
                  "invoice_start_date": {
                    "type": "string",
                    "format": "date",
                    "example": "2024-01-11",
                    "description": "YYYY-MM-DD"
                  },
                  "invoice_end_date": {
                    "type": "string",
                    "format": "date",
                    "example": "2024-01-11",
                    "description": "YYYY-MM-DD"
                  }
                },
                "required": [
                  "counterparty_id",
                  "manager_id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/tables/orders/{id}/nomenclatures": {
      "get": {
        "summary": "Получение содержимого заказа (табличное представление)",
        "operationId": "order-nomenclatures-table",
        "tags": [
          "ERP / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TablesEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "orderNomenclatures": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 19,
                                "description": "первичный ключ"
                              },
                              "code": {
                                "type": "string",
                                "example": "1234"
                              },
                              "name": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Tony Moly Soft Touch Air Puff 5P"
                                  }
                                },
                                "description": "объект с номенклатурным наименованием товара"
                              },
                              "warehouse": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Петухова"
                                  }
                                },
                                "description": "объект с наименованием склада"
                              },
                              "city": {
                                "type": "string",
                                "example": "Новосибирск",
                                "description": "город"
                              },
                              "brand": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000//storage/uploads/default_brand.png"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Tony Moly"
                                  }
                                },
                                "description": "объект с информацией о производителе"
                              },
                              "vat": {
                                "type": "string",
                                "format": "decimal",
                                "example": "20.00",
                                "description": "НДС"
                              },
                              "unit": {
                                "type": "string",
                                "example": "ед",
                                "description": "единицы измерения товара"
                              },
                              "quantity": {
                                "type": "integer",
                                "example": 5,
                                "description": "кол-во товара"
                              },
                              "price": {
                                "type": "string",
                                "format": "decimal",
                                "example": "900.00",
                                "description": "стоимость за 1 единицу"
                              },
                              "amount": {
                                "type": "string",
                                "format": "decimal",
                                "example": "4500.00",
                                "description": "общая стоимость"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "orderNomenclatures"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Заказы/#order-nomenclatures-table"
        },
        "description": "#### Параметры запроса - `query` — поисковая строка"
      }
    },
    "/api/orders/{id}/nomenclatures": {
      "post": {
        "summary": "Добавление товаров в заказ (= создание Reservation) ⚠ backend bug",
        "operationId": "order-nomenclature-create",
        "tags": [
          "ERP / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 23,
                      "description": "ID (первичный ключ) товарной позиции в заказе"
                    },
                    "orderNomenclature": {
                      "type": "object",
                      "properties": {
                        "warehouseNomenclature": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID (первичный ключ) товарной позиции в заказе"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000//storage/uploads/kcdDZKHha8HbujO4z80uYmOsayHHxTXZrM2q6GEN.webp"
                            },
                            "name": {
                              "type": "string",
                              "example": "BANILA CO Glow Fit Foundation Brush / Склад Петухова / 5 ед / 204500.00 руб"
                            }
                          },
                          "description": "объект с информацией о товаре, хранимом на складе"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 1,
                          "description": "кол-во товара"
                        },
                        "unit": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID (первичный ключ) товарной позиции в заказе"
                            },
                            "name": {
                              "type": "string",
                              "example": "Литр"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-06-24T09:57:10.000000Z"
                            }
                          },
                          "description": "объект с информацией о единицах измерения"
                        },
                        "price": {
                          "type": "string",
                          "format": "decimal",
                          "example": "1.00",
                          "description": "цена товара"
                        },
                        "vat": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID (первичный ключ) товарной позиции в заказе"
                            },
                            "name": {
                              "type": "string",
                              "example": "Без НДС"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-08-12T08:51:40.000000Z"
                            }
                          },
                          "description": "НДС"
                        },
                        "amount": {
                          "type": "string",
                          "format": "decimal",
                          "example": "1.00",
                          "description": "общая стоимость товарной позиции"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Заказы/#order-nomenclature-create"
        },
        "description": "⚠ **Backend bug:** endpoint часто возвращает `500` на корректных входных данных. Bypass: дождаться фикса бэка либо использовать E-Commerce flow (`POST /api/counterparty/orders`), который создаёт резервации внутри транзакции. **NB:** под капотом этот endpoint создаёт запись `Reservation` (см. erp-rules §18.7). `{id}` в `PUT`/`DELETE …/nomenclatures/{id}` — это id записи `Reservation`, не `nomenclature_id`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nomenclature_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID номенклатуры из GET /api/nomenclatures. Без него резерв создаётся без привязки к конкретному товару."
                  },
                  "quantity": {
                    "type": "integer",
                    "example": 1,
                    "description": "кол-во товара"
                  },
                  "storage_unit_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Единица измерения. **НЕ** /api/units. Запись имеет только {id, name, abbreviation} — без avatar/created_at. Получить актуальные значения: `GET /api/storage_units`"
                  },
                  "price": {
                    "type": "integer",
                    "example": 100,
                    "description": "цена товара"
                  },
                  "vat_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Ставка НДС. **НЕ** /api/vat (singular). См. /enums#dictionary-sources Получить актуальные значения: `GET /api/vats`"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/orders/{id}/nomenclatures/{nomenclatureId}": {
      "put": {
        "summary": "Обновление товаров в заказе",
        "operationId": "order-nomenclature-update",
        "tags": [
          "ERP / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "nomenclatureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "example": 23,
                      "description": "ID (первичный ключ) товарной позиции в заказе"
                    },
                    "orderNomenclature": {
                      "type": "object",
                      "properties": {
                        "warehouseNomenclature": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID (первичный ключ) товарной позиции в заказе"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000//storage/uploads/kcdDZKHha8HbujO4z80uYmOsayHHxTXZrM2q6GEN.webp"
                            },
                            "name": {
                              "type": "string",
                              "example": "BANILA CO Glow Fit Foundation Brush / Склад Петухова / 5 ед / 204500.00 руб"
                            }
                          },
                          "description": "объект с информацией о товаре, хранимом на складе"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 1,
                          "description": "кол-во товара"
                        },
                        "unit": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID (первичный ключ) товарной позиции в заказе"
                            },
                            "name": {
                              "type": "string",
                              "example": "Литр"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-06-24T09:57:10.000000Z"
                            }
                          },
                          "description": "объект с информацией о единицах измерения"
                        },
                        "price": {
                          "type": "string",
                          "format": "decimal",
                          "example": "1.00",
                          "description": "цена товара"
                        },
                        "vat": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID (первичный ключ) товарной позиции в заказе"
                            },
                            "name": {
                              "type": "string",
                              "example": "Без НДС"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-08-12T08:51:40.000000Z"
                            }
                          },
                          "description": "НДС"
                        },
                        "amount": {
                          "type": "string",
                          "format": "decimal",
                          "example": "1.00",
                          "description": "общая стоимость товарной позиции"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Заказы/#order-nomenclature-update"
        },
        "description": "#### Параметры запроса - `nomenclature_id` — ID номенклатуры (`GET /api/nomenclatures`) - `quantity` — кол-во товара - `storage_unit_id` — ID единицы измерения - `price` — стоимость товара - `vat_id` — ID НДС",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "nomenclature_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID номенклатуры (GET /api/nomenclatures)"
                  },
                  "quantity": {
                    "type": "integer",
                    "example": 1,
                    "description": "кол-во товара"
                  },
                  "storage_unit_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Единица измерения. **НЕ** /api/units. Запись имеет только {id, name, abbreviation} — без avatar/created_at. Получить актуальные значения: `GET /api/storage_units`"
                  },
                  "price": {
                    "type": "integer",
                    "example": 100,
                    "description": "цена товара"
                  },
                  "vat_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Ставка НДС. **НЕ** /api/vat (singular). См. /enums#dictionary-sources Получить актуальные значения: `GET /api/vats`"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление товаров из заказа",
        "operationId": "order-nomenclature-delete",
        "tags": [
          "ERP / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "nomenclatureId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Заказы/#order-nomenclature-delete"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/tables/orders/{id}/files": {
      "get": {
        "summary": "Получение списка файлов (табличное представление)",
        "operationId": "order-files-table",
        "tags": [
          "ERP / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TablesEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "files": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 4,
                                "description": "первичный ключ"
                              },
                              "creator": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Полищук Артём"
                                  }
                                },
                                "description": "создатель файла"
                              },
                              "name": {
                                "type": "string",
                                "example": "Rating container.svg",
                                "description": "имя файла"
                              },
                              "path": {
                                "type": "string",
                                "format": "uri",
                                "example": "http://localhost:8000/storage/uploads/u7TY0sLEoWiFgeglUHHbWgchUIS41yhAPZ0uMuYX.svg",
                                "description": "ссылка на загрузку файла"
                              },
                              "created_at": {
                                "type": "string",
                                "example": "18.04.2024 13:50",
                                "description": "дата/время загрузки файла"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "files"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Заказы/#order-files-table"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/orders/{id}/files": {
      "post": {
        "summary": "Добавление файла",
        "operationId": "order-file-create",
        "tags": [
          "ERP / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "file": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 593,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Инфо Агбис (2).txt",
                          "description": "имя файла"
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3,
                              "description": "первичный ключ"
                            },
                            "name": {
                              "type": "string",
                              "example": "Документ к заказу",
                              "description": "имя файла"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-27T07:00:46.000000Z",
                              "description": "дата/время загрузки файла"
                            }
                          },
                          "description": "объект с информацией о типе загружаемого файла"
                        },
                        "path": {
                          "type": "string",
                          "format": "uri",
                          "example": "http://localhost:8000/storage/uploads/QWu9ghBy6kfsXsEQZBuIqhpEoY8ghrCIFZhBdpwj.txt",
                          "description": "ссылка на загрузку файла"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-07-31T07:06:37.000000Z",
                          "description": "дата/время загрузки файла"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-07-31T07:06:37.000000Z",
                          "description": "дата/время последнего обновления файла"
                        }
                      },
                      "description": "загружаемый документ"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Заказы/#order-file-create"
        },
        "description": "#### Параметры запроса - `file` — загружаемый документ",
        "x-used-in": [
          "17.6"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "example": "FILE('path')",
                    "description": "загружаемый документ"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        }
      }
    },
    "/api/orders/{id}/history": {
      "get": {
        "summary": "Получение истории изменений по заказу",
        "operationId": "order-history",
        "tags": [
          "ERP / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/LaravelPaginator"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {}
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Заказы/#order-history"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/orders/{id}/request-refund": {
      "post": {
        "summary": "Запрос возврата по заказу",
        "operationId": "order-request-refund",
        "tags": [
          "ERP / Заказы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Заказы/#order-request-refund"
        },
        "description": "Создаёт запрос на возврат по заказу. Фиксирует время запроса, инициатора и комментарий.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "comment": {
                    "type": "string",
                    "example": "Товар не подошёл по размеру",
                    "description": "причина возврата"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/counterparties": {
      "get": {
        "summary": "Список контрагентов",
        "operationId": "counterparties-list",
        "tags": [
          "ERP / Контрагенты"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparties": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "is_company": {
                            "type": "boolean",
                            "example": true,
                            "description": "true для компании, false для физлица"
                          },
                          "type": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 2,
                                "description": "первичный ключ"
                              },
                              "name": {
                                "type": "string",
                                "example": "Юр. лицо"
                              },
                              "avatar": {
                                "type": "string",
                                "nullable": true
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-03-22T14:01:37.000000Z"
                              }
                            },
                            "description": "объект типа контрагента (id, name, avatar, created_at) или null"
                          },
                          "manager": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "первичный ключ"
                              },
                              "first_name": {
                                "type": "string",
                                "example": "Артём"
                              },
                              "last_name": {
                                "type": "string",
                                "example": "Полищук"
                              },
                              "middle_name": {
                                "type": "string",
                                "example": "Николаевич"
                              },
                              "name": {
                                "type": "string",
                                "example": "Полищук Артём"
                              }
                            },
                            "description": "объект менеджера (id, first_name, last_name, middle_name, name) или null"
                          },
                          "avatar": {
                            "type": "string",
                            "nullable": true
                          },
                          "name": {
                            "type": "string",
                            "example": "ООО \"АЙТЕКО\""
                          },
                          "inn": {
                            "type": "string",
                            "example": "5403057658"
                          },
                          "kpp": {
                            "type": "string",
                            "example": "540301001"
                          },
                          "head": {
                            "type": "string",
                            "example": "Снегирёв Алексей Игоревич"
                          },
                          "registered_at": {
                            "type": "string",
                            "format": "date",
                            "example": "2020-04-02"
                          },
                          "phone_1": {
                            "type": "string",
                            "example": "79999999999"
                          },
                          "phone_2": {
                            "type": "string",
                            "example": "78888888888"
                          },
                          "email": {
                            "type": "string",
                            "example": "support@itecho.ru"
                          },
                          "legal_address": {
                            "type": "string",
                            "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-03-22T14:01:37.000000Z"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-04-03T07:07:11.000000Z"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Контрагенты/#counterparties-list"
        },
        "description": "#### Параметры запроса (query string) - `query` — поисковая строка - `is_company` — фильтр компании/физлица (boolean) - `counterparty_type_id[]` — массив ID типов контрагентов - `manager_id[]` — массив ID менеджеров - `date_from`, `date_to` — диапазон по дате добавления - `credit` — задолженность равна (int) - `credit_gt` — задолженность больше - `credit_lt` — задолженность меньше",
        "x-used-in": [
          "17.2"
        ]
      },
      "post": {
        "summary": "Создание контрагента",
        "operationId": "counterparty-create",
        "tags": [
          "ERP / Контрагенты"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparty": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 42
                        },
                        "is_company": {
                          "type": "boolean",
                          "example": false,
                          "description": "true"
                        },
                        "...": {
                          "type": "string",
                          "example": "поля как в GET"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Контрагенты/#counterparty-create"
        },
        "description": "#### Параметры запроса (тело) Формат тела зависит от `is_company`. **Физлицо** (`is_company: false`): - `is_company` — `false` - `counterparty_type_id` — ID типа контрагента (nullable) - `avatar_id` — ID файла аватара (optional) - `first_name`, `last_name`, `middle_name` — ФИО - `birthday` — `YYYY-MM-DD` - `phone_1`, `phone_2`, `email`, `address` **Компания** (`is_company: true`): - `is_company` — `true` - `counterparty_type_id` — ID типа - `avatar_id` — ID файла (optional) - `name` — название - `inn`, `kpp` - `head` — ФИО директора - `registered_at` — дата регистрации `YYYY-MM-DD` - `phone_1`",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "is_company": {
                    "type": "boolean",
                    "example": false,
                    "description": "true"
                  },
                  "counterparty_type_id": {
                    "type": "integer",
                    "example": 2,
                    "enum": [
                      1,
                      2,
                      3
                    ],
                    "x-enum-varnames": [
                      "Клиент",
                      "Поставщик",
                      "Свой"
                    ],
                    "description": "Тип контрагента. ⚠ значения — снимок справочника, НЕ путать с is_company; ID проверять через list-endpoint. См. /enums#counterparty-types Получить актуальные значения: `GET /api/counterparty_types`"
                  },
                  "first_name": {
                    "type": "string",
                    "example": "Алексей",
                    "description": "ФИО"
                  },
                  "last_name": {
                    "type": "string",
                    "example": "Петров"
                  },
                  "middle_name": {
                    "type": "string",
                    "example": "Викторович"
                  },
                  "birthday": {
                    "type": "string",
                    "format": "date",
                    "example": "1980-04-02",
                    "description": "YYYY-MM-DD"
                  },
                  "phone_1": {
                    "type": "string",
                    "example": "79999999990"
                  },
                  "phone_2": {
                    "type": "string",
                    "example": "78888888888"
                  },
                  "email": {
                    "type": "string",
                    "example": "support@itecho.ru"
                  },
                  "address": {
                    "type": "string",
                    "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/tables/counterparties": {
      "get": {
        "summary": "Таблица контрагентов (для UI с колонками и пагинацией)",
        "operationId": "counterparties-table",
        "tags": [
          "ERP / Контрагенты"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TablesEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "counterparties": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "служебные"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-03-22T14:01:37.000000Z"
                              },
                              "type": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "example": "/icons/company.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Юр. лицо"
                                  }
                                }
                              },
                              "name": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "ООО \"АЙТЕКО\""
                                  }
                                }
                              },
                              "manager": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Полищук Артём"
                                  }
                                }
                              },
                              "inn": {
                                "type": "string",
                                "example": "5403057658"
                              },
                              "contact": {
                                "type": "string",
                                "nullable": true
                              },
                              "credit": {
                                "type": "integer",
                                "example": 0
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "counterparties"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Контрагенты/#counterparties-table"
        },
        "description": "Возвращает данные в формате, пригодном для отрисовки таблицы: список колонок, упрощённое представление контрагентов и пагинацию. Поддерживает те же query-фильтры, что и `/api/counterparties`."
      }
    },
    "/api/counterparties/{id}": {
      "get": {
        "summary": "Получение контрагента по ID",
        "operationId": "counterparty-get",
        "tags": [
          "ERP / Контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparty": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "is_company": {
                          "type": "boolean",
                          "example": false
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "name": {
                              "type": "string",
                              "example": "Розница"
                            },
                            "avatar": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-22T14:01:37.000000Z"
                            }
                          }
                        },
                        "manager": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Артём"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Полищук"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Николаевич"
                            },
                            "name": {
                              "type": "string",
                              "example": "Полищук Артём"
                            }
                          }
                        },
                        "avatar": {
                          "type": "string",
                          "nullable": true
                        },
                        "first_name": {
                          "type": "string",
                          "example": "Алексей"
                        },
                        "last_name": {
                          "type": "string",
                          "example": "Петров"
                        },
                        "middle_name": {
                          "type": "string",
                          "example": "Викторович"
                        },
                        "birthday": {
                          "type": "string",
                          "format": "date",
                          "example": "1980-04-02"
                        },
                        "address": {
                          "type": "string",
                          "example": "630073, г. Новосибирск, Новогодняя ул., д. 20/1, кв. 26"
                        },
                        "phone_1": {
                          "type": "string",
                          "example": "79999999990"
                        },
                        "phone_2": {
                          "type": "string",
                          "example": "78888888888"
                        },
                        "email": {
                          "type": "string",
                          "example": "support@itecho.ru"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-03-22T14:01:37.000000Z"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-04-03T07:07:11.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Контрагенты/#counterparty-get"
        },
        "description": "#### Параметры запроса Только `id` контрагента в пути URL.",
        "x-used-in": [
          "17.2"
        ]
      },
      "put": {
        "summary": "Изменение контрагента",
        "operationId": "counterparty-update",
        "tags": [
          "ERP / Контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterparty": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 42
                        },
                        "...": {
                          "type": "string",
                          "example": "обновлённый объект"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Контрагенты/#counterparty-update"
        },
        "description": "#### Параметры запроса (тело) Те же поля, что и в `POST /api/counterparties` (соответствующий вариант `is_company`).",
        "x-used-in": [
          "17.2",
          "17.6"
        ]
      },
      "delete": {
        "summary": "Удаление контрагента",
        "operationId": "counterparty-delete",
        "tags": [
          "ERP / Контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Контрагенты/#counterparty-delete"
        },
        "description": "#### Параметры запроса Только `id` контрагента в пути URL."
      }
    },
    "/api/counterparties/{id}/bank_requisites": {
      "get": {
        "summary": "Список банковских реквизитов контрагента",
        "operationId": "bank-requisites-list",
        "tags": [
          "ERP / Контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bankRequisites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "название счёта/банка"
                          },
                          "name": {
                            "type": "string",
                            "example": "Расчётный счёт в Сбербанке"
                          },
                          "bik": {
                            "type": "string",
                            "example": "045004641",
                            "description": "БИК"
                          },
                          "kpp": {
                            "type": "string",
                            "example": "540301001",
                            "description": "КПП"
                          },
                          "payment_account": {
                            "type": "string",
                            "example": "40702810844050003101",
                            "description": "номер расчётного счёта"
                          },
                          "address": {
                            "type": "string",
                            "example": "630007, Новосибирская область, г. Новосибирск, Красный проспект, д. 5",
                            "description": "адрес банка"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-03-22T14:01:37.000000Z"
                          },
                          "updated_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-04-03T07:07:11.000000Z"
                          }
                        }
                      }
                    },
                    "bankRequisitesCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "общее количество"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Контрагенты/#bank-requisites-list"
        },
        "description": "#### Ответ"
      },
      "post": {
        "summary": "Добавление банковского реквизита",
        "operationId": "bank-requisite-create",
        "tags": [
          "ERP / Контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bankRequisites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Расчётный счёт в Сбербанке",
                            "description": "название счёта/банка"
                          },
                          "bik": {
                            "type": "string",
                            "example": "045004641",
                            "description": "БИК"
                          },
                          "kpp": {
                            "type": "string",
                            "example": "540301001",
                            "description": "КПП"
                          },
                          "payment_account": {
                            "type": "string",
                            "example": "40702810844050003101",
                            "description": "номер расчётного счёта"
                          },
                          "address": {
                            "type": "string",
                            "example": "630007, г. Новосибирск, Красный проспект, д. 5",
                            "description": "адрес банка"
                          }
                        }
                      }
                    },
                    "bankRequisitesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Контрагенты/#bank-requisite-create"
        },
        "description": "#### Параметры запроса (тело) - `name` — название счёта/банка - `bik` — БИК - `kpp` — КПП - `payment_account` — номер расчётного счёта - `address` — адрес банка",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Расчётный счёт в Сбербанке",
                    "description": "название счёта/банка"
                  },
                  "bik": {
                    "type": "string",
                    "example": "045004641",
                    "description": "БИК"
                  },
                  "kpp": {
                    "type": "string",
                    "example": "540301001",
                    "description": "КПП"
                  },
                  "payment_account": {
                    "type": "string",
                    "example": "40702810844050003101",
                    "description": "номер расчётного счёта"
                  },
                  "address": {
                    "type": "string",
                    "example": "630007, г. Новосибирск, Красный проспект, д. 5",
                    "description": "адрес банка"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/counterparties/{id}/bank_requisites/{requisiteId}": {
      "put": {
        "summary": "Изменение банковского реквизита",
        "operationId": "bank-requisite-update",
        "tags": [
          "ERP / Контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "requisiteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Контрагенты/#bank-requisite-update"
        },
        "description": "#### Параметры запроса (тело) Те же поля, что и в POST: `name`, `bik`, `kpp`, `payment_account`, `address`."
      }
    },
    "/api/counterparties/{id}/contacts": {
      "get": {
        "summary": "Список контактов контрагента",
        "operationId": "contacts-list",
        "tags": [
          "ERP / Контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "contacts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "first_name": {
                            "type": "string",
                            "example": "Анна"
                          },
                          "last_name": {
                            "type": "string",
                            "example": "Иванова"
                          },
                          "middle_name": {
                            "type": "string",
                            "example": "Сергеевна"
                          },
                          "birthday": {
                            "type": "string",
                            "format": "date",
                            "example": "1985-07-15"
                          },
                          "phone_1": {
                            "type": "string",
                            "example": "79991234567"
                          },
                          "phone_2": {
                            "type": "string",
                            "example": ""
                          },
                          "email": {
                            "type": "string",
                            "example": "anna@itecho.ru"
                          },
                          "address": {
                            "type": "string",
                            "example": "г. Новосибирск, ул. Ленина, 1"
                          }
                        }
                      }
                    },
                    "contactsCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "общее количество"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Контрагенты/#contacts-list"
        },
        "description": "#### Ответ"
      },
      "post": {
        "summary": "Добавление контакта",
        "operationId": "contact-create",
        "tags": [
          "ERP / Контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Контрагенты/#contact-create"
        },
        "description": "#### Параметры запроса (тело) - `first_name`, `last_name`, `middle_name` — ФИО - `birthday` — `YYYY-MM-DD` - `phone_1`, `phone_2`, `email`, `address`",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "first_name": {
                    "type": "string",
                    "example": "Анна",
                    "description": "ФИО"
                  },
                  "last_name": {
                    "type": "string",
                    "example": "Иванова"
                  },
                  "middle_name": {
                    "type": "string",
                    "example": "Сергеевна"
                  },
                  "birthday": {
                    "type": "string",
                    "format": "date",
                    "example": "1985-07-15",
                    "description": "YYYY-MM-DD"
                  },
                  "phone_1": {
                    "type": "string",
                    "example": "79991234567"
                  },
                  "phone_2": {
                    "type": "string",
                    "example": ""
                  },
                  "email": {
                    "type": "string",
                    "example": "anna@itecho.ru"
                  },
                  "address": {
                    "type": "string",
                    "example": "г. Новосибирск, ул. Ленина, 1"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/counterparties/{id}/contacts/{contactId}": {
      "put": {
        "summary": "Изменение контакта",
        "operationId": "contact-update",
        "tags": [
          "ERP / Контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Контрагенты/#contact-update"
        },
        "description": "#### Параметры запроса (тело) Те же поля, что и в POST."
      }
    },
    "/api/counterparties/{id}/history": {
      "get": {
        "summary": "История изменений контрагента",
        "operationId": "counterparty-history",
        "tags": [
          "ERP / Контрагенты"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/LaravelPaginator"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {}
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Контрагенты/#counterparty-history"
        },
        "description": "Возвращает события по контрагенту в формате таймлайна с пагинацией.",
        "x-used-in": [
          "17.2"
        ]
      }
    },
    "/api/tables/shops": {
      "get": {
        "summary": "Получение списка магазинов (табличное представление)",
        "operationId": "shops-table",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TablesEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "shops": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 17,
                                "description": "первичный ключ"
                              },
                              "name": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000//storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Сей Момент"
                                  }
                                },
                                "description": "объект с информацией о названии магазина"
                              },
                              "branch": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000//storage/uploads/b9t9B4Y4Fq6dAKvgVW2vhzFJ12ZrgRgvVHdMnfjt.png"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "ИП Дерюгин Дмитрий Александрович"
                                  }
                                },
                                "description": "объект с информацией о бизнесе (первый из массива)"
                              },
                              "city": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 1,
                                    "description": "первичный ключ"
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Москва",
                                    "description": "объект с информацией о названии магазина"
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "example": "2024-04-19T09:18:41.000000Z"
                                  }
                                },
                                "description": "город, в котором расположен магазин"
                              },
                              "address": {
                                "type": "string",
                                "example": "115477, г Москва, р-н Царицыно, ул Деловая, д 20",
                                "description": "полный адрес магазина"
                              },
                              "creator": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Полищук Артём"
                                  }
                                },
                                "description": "объект, содержащий информацию о пользователе, который добавил запись в БД"
                              },
                              "schedule": {
                                "type": "string",
                                "example": "Ежедневно, с 10:00 до 18:00",
                                "description": "график работы магазина"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "shops"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shops-table"
        },
        "description": "#### Параметры запроса - `query` — поисковая строка - `city_id` — ID города из справочника - `branch_id` — ID бизнеса из справочника - `is_shop` — флаг, указывающий на то, является ли значение магазином (true) или пунктом выдачи (false)"
      }
    },
    "/api/shops": {
      "get": {
        "summary": "Получение списка магазинов",
        "operationId": "shops-list",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "shops": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 3,
                            "description": "первичный ключ"
                          },
                          "is_shop": {
                            "type": "boolean",
                            "example": true,
                            "description": "флаг: магазин (true) или пункт выдачи (false)"
                          },
                          "avatar": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 3,
                                "description": "первичный ключ"
                              },
                              "name": {
                                "type": "string",
                                "example": "Container.svg",
                                "description": "название магазина"
                              },
                              "path": {
                                "type": "string",
                                "format": "uri",
                                "example": "http://localhost:8000/storage/uploads/J89936UEJYHmqaWyN8TA2JfTfFHWGvt2jequMsyd.svg"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-04-18T13:37:45.000000Z"
                              },
                              "updated_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-04-18T13:37:45.000000Z"
                              }
                            },
                            "description": "объект с информацией о фотографии магазина"
                          },
                          "code": {
                            "type": "string",
                            "example": "01",
                            "description": "уникальный код магазина"
                          },
                          "name": {
                            "type": "string",
                            "example": "Столичный",
                            "description": "название магазина"
                          },
                          "branches": {
                            "type": "array",
                            "items": {}
                          },
                          "warehouses": {
                            "type": "array",
                            "items": {}
                          },
                          "address": {
                            "type": "string",
                            "example": "г. Москва, ул. Красная Площадь, 1",
                            "description": "полный адрес магазина"
                          },
                          "latitude": {
                            "type": "string",
                            "nullable": true
                          },
                          "longitude": {
                            "type": "string",
                            "nullable": true
                          },
                          "phone": {
                            "type": "string",
                            "example": "+79851234567",
                            "description": "телефон"
                          }
                        }
                      }
                    },
                    "shopsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shops-list"
        },
        "description": "#### Параметры запроса - `query` — поисковая строка - `city_id` — ID города из справочника - `branch_id` — ID бизнеса из справочника - `is_shop` — флаг, указывающий на то, является ли значение магазином (true) или пунктом выдачи (false)"
      },
      "post": {
        "summary": "Добавление магазина",
        "operationId": "shop-create",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "shop": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 4
                        },
                        "is_shop": {
                          "type": "boolean",
                          "example": true
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg",
                              "description": "название магазина"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор",
                                  "description": "название магазина"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            }
                          }
                        },
                        "code": {
                          "type": "string",
                          "example": "10",
                          "description": "уникальный код магазина"
                        },
                        "name": {
                          "type": "string",
                          "example": "Сей Момент",
                          "description": "название магазина"
                        },
                        "branches": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 15
                              },
                              "code": {
                                "type": "string",
                                "example": "1",
                                "description": "уникальный код магазина"
                              },
                              "name": {
                                "type": "string",
                                "example": "ИП Дерюгин Дмитрий Александрович",
                                "description": "название магазина"
                              },
                              "photo": {
                                "type": "string",
                                "nullable": true
                              },
                              "owned_by_us": {
                                "type": "boolean",
                                "example": false
                              },
                              "address": {
                                "type": "string",
                                "example": "283045, Донецкая Народная респ, г Донецк, ул Профессоров Богославских, д 5а",
                                "description": "адрес магазина, полученный из Dadata"
                              },
                              "storage_capacity": {
                                "type": "string",
                                "nullable": true
                              },
                              "storage_unit": {
                                "type": "string",
                                "nullable": true
                              },
                              "city": {
                                "type": "string",
                                "nullable": true
                              },
                              "counterparty": {
                                "type": "string",
                                "nullable": true
                              }
                            }
                          }
                        },
                        "warehouses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "code": {
                                "type": "string",
                                "nullable": true
                              },
                              "name": {
                                "type": "string",
                                "example": "Петухова",
                                "description": "название магазина"
                              },
                              "photo": {
                                "type": "string",
                                "nullable": true
                              },
                              "owned_by_us": {
                                "type": "boolean",
                                "example": true
                              },
                              "address": {
                                "type": "string",
                                "example": "Петухова 155/1 к4",
                                "description": "адрес магазина, полученный из Dadata"
                              },
                              "storage_capacity": {
                                "type": "integer",
                                "example": 100000
                              },
                              "storage_unit": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 2
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Кубический метр",
                                    "description": "название магазина"
                                  },
                                  "abbreviation": {
                                    "type": "string",
                                    "example": "м³"
                                  }
                                }
                              },
                              "city": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 2
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Новосибирск",
                                    "description": "название магазина"
                                  },
                                  "avatar": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg"
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "example": "2024-04-19T09:18:41.000000Z"
                                  }
                                }
                              },
                              "counterparty": {
                                "type": "string",
                                "nullable": true
                              }
                            }
                          }
                        },
                        "address": {
                          "type": "string",
                          "example": "115477, г Москва, р-н Царицыно, ул Деловая, д 20",
                          "description": "адрес магазина, полученный из Dadata"
                        },
                        "phone": {
                          "type": "string",
                          "example": "79999999999",
                          "description": "номер телефона"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-create"
        },
        "description": "#### Параметры запроса - `avatar_id` — ID файла после его загрузки на сервер - `code` — уникальный код магазина - `name` — название магазина - `address` — адрес магазина, полученный из Dadata - `branches[]` — массив ID бизнесов - `warehouses[]` — массив ID складов - `phone` — номер телефона",
        "x-used-in": [
          "17.3"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID файла после его загрузки на сервер"
                  },
                  "is_shop": {
                    "type": "boolean",
                    "example": true
                  },
                  "code": {
                    "type": "string",
                    "example": "10",
                    "description": "уникальный код магазина"
                  },
                  "name": {
                    "type": "string",
                    "example": "Сей Момент",
                    "description": "название магазина"
                  },
                  "address": {
                    "type": "string",
                    "example": "115477, г Москва, р-н Царицыно, ул Деловая, д 20",
                    "description": "адрес магазина, полученный из Dadata"
                  },
                  "branches": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 15
                    }
                  },
                  "warehouses": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1
                    }
                  },
                  "phone": {
                    "type": "string",
                    "example": "79999999999",
                    "description": "номер телефона"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/shops/{id}": {
      "put": {
        "summary": "Обновление выбранного магазина",
        "operationId": "shop-update",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-update"
        },
        "description": "#### Параметры запроса - `avatar_id` — ID файла после его загрузки на сервер - `code` — уникальный код магазина - `name` — название магазина - `address` — адрес магазина, полученный из Dadata - `branches[]` — массив ID бизнесов - `warehouses[]` — массив ID складов - `phone` — номер телефона",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID файла после его загрузки на сервер"
                  },
                  "is_shop": {
                    "type": "boolean",
                    "example": true
                  },
                  "code": {
                    "type": "string",
                    "example": "10",
                    "description": "уникальный код магазина"
                  },
                  "name": {
                    "type": "string",
                    "example": "Сей Момент",
                    "description": "название магазина"
                  },
                  "address": {
                    "type": "string",
                    "example": "115477, г Москва, р-н Царицыно, ул Деловая, д 20",
                    "description": "адрес магазина, полученный из Dadata"
                  },
                  "branches": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 15
                    }
                  },
                  "warehouses": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1
                    }
                  },
                  "phone": {
                    "type": "string",
                    "example": "79999999999",
                    "description": "номер телефона"
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "Получение выбранного магазина",
        "operationId": "shop-show",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "shop": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 4,
                          "description": "первичный ключ"
                        },
                        "is_shop": {
                          "type": "boolean",
                          "example": true,
                          "description": "флаг, указывающий на то, является ли значение магазином (true) или пунктом выдачи (false)"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ"
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg",
                              "description": "название магазина"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "первичный ключ"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор",
                                  "description": "название магазина"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg",
                                  "description": "объект с информацией о загруженном файле"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            }
                          },
                          "description": "объект с информацией о загруженном файле"
                        },
                        "code": {
                          "type": "string",
                          "example": "10",
                          "description": "уникальный код магазина"
                        },
                        "name": {
                          "type": "string",
                          "example": "Сей Момент",
                          "description": "название магазина"
                        },
                        "branches": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 15,
                                "description": "первичный ключ"
                              },
                              "code": {
                                "type": "string",
                                "example": "1",
                                "description": "уникальный код магазина"
                              },
                              "name": {
                                "type": "string",
                                "example": "ИП Дерюгин Дмитрий Александрович",
                                "description": "название магазина"
                              },
                              "photo": {
                                "type": "string",
                                "nullable": true
                              },
                              "owned_by_us": {
                                "type": "boolean",
                                "example": false
                              },
                              "address": {
                                "type": "string",
                                "example": "283045, Донецкая Народная респ, г Донецк, ул Профессоров Богославских, д 5а",
                                "description": "адрес магазина"
                              },
                              "storage_capacity": {
                                "type": "string",
                                "nullable": true
                              },
                              "storage_unit": {
                                "type": "string",
                                "nullable": true
                              },
                              "city": {
                                "type": "string",
                                "nullable": true
                              },
                              "counterparty": {
                                "type": "string",
                                "nullable": true
                              }
                            }
                          }
                        },
                        "warehouses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "description": "первичный ключ"
                              },
                              "code": {
                                "type": "string",
                                "nullable": true
                              },
                              "name": {
                                "type": "string",
                                "example": "Петухова",
                                "description": "название магазина"
                              },
                              "photo": {
                                "type": "string",
                                "nullable": true
                              },
                              "owned_by_us": {
                                "type": "boolean",
                                "example": true
                              },
                              "address": {
                                "type": "string",
                                "example": "Петухова 155/1 к4",
                                "description": "адрес магазина"
                              },
                              "storage_capacity": {
                                "type": "integer",
                                "example": 100000
                              },
                              "storage_unit": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 2,
                                    "description": "первичный ключ"
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Кубический метр",
                                    "description": "название магазина"
                                  },
                                  "abbreviation": {
                                    "type": "string",
                                    "example": "м³"
                                  }
                                }
                              },
                              "city": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 2,
                                    "description": "первичный ключ"
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Новосибирск",
                                    "description": "название магазина"
                                  },
                                  "avatar": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg",
                                    "description": "объект с информацией о загруженном файле"
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "example": "2024-04-19T09:18:41.000000Z"
                                  }
                                }
                              },
                              "counterparty": {
                                "type": "string",
                                "nullable": true
                              }
                            }
                          }
                        },
                        "address": {
                          "type": "string",
                          "example": "115477, г Москва, р-н Царицыно, ул Деловая, д 20",
                          "description": "адрес магазина"
                        },
                        "phone": {
                          "type": "string",
                          "example": "79999999999",
                          "description": "номер телефона магазина"
                        },
                        "schedule": {
                          "type": "string",
                          "example": "Ежедневно, с 10:00 до 18:00",
                          "description": "график работы"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-show"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      },
      "delete": {
        "summary": "Удаление выбранного магазина",
        "operationId": "shop-delete",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-delete"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/shops/{id}/history": {
      "get": {
        "summary": "Получение истории изменений по выбранному магазину",
        "operationId": "shop-history",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/LaravelPaginator"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 170,
                                "description": "первичный ключ"
                              },
                              "icon": {
                                "type": "string",
                                "example": "done",
                                "description": "иконка"
                              },
                              "color": {
                                "type": "string",
                                "example": "success",
                                "description": "цвет"
                              },
                              "title": {
                                "type": "string",
                                "example": "Редактирование",
                                "description": "заголовок"
                              },
                              "description": {
                                "type": "string",
                                "example": "Редактирование: Полищук Артём",
                                "description": "описание"
                              },
                              "datetime": {
                                "type": "string",
                                "example": "28.06.2024 06:09",
                                "description": "дата выполнения действия"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-history"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/shops/{id}/hours": {
      "get": {
        "summary": "Получение списка дней и часов работы выбранного магазина",
        "operationId": "shop-hours-list",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hours": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "day_of_week": {
                            "type": "string",
                            "example": "ПН",
                            "description": "день недели"
                          },
                          "is_working_day": {
                            "type": "boolean",
                            "example": true,
                            "description": "флаг, указывающий на то, является ли день рабочим (true) или выходным (false)"
                          },
                          "work_start_time": {
                            "type": "string",
                            "example": "09:00:00",
                            "description": "время начала рабочего дня"
                          },
                          "work_end_time": {
                            "type": "string",
                            "example": "18:00:00",
                            "description": "время завершения рабочего дня"
                          },
                          "break_start_time": {
                            "type": "string",
                            "nullable": true
                          },
                          "break_end_time": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    },
                    "hoursCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-hours-list"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      },
      "post": {
        "summary": "Добавление дней и часов работы выбранного магазина",
        "operationId": "shop-hours-create",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hour": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 4,
                          "description": "первичный ключ"
                        },
                        "day_of_week": {
                          "type": "string",
                          "example": "ПН",
                          "description": "день недели"
                        },
                        "is_working_day": {
                          "type": "boolean",
                          "example": true,
                          "description": "флаг, указывающий на то, является ли день рабочим (true) или выходным (false)"
                        },
                        "work_start_time": {
                          "type": "string",
                          "example": "09:00",
                          "description": "время начала рабочего дня"
                        },
                        "work_end_time": {
                          "type": "string",
                          "example": "18:00",
                          "description": "время завершения рабочего дня"
                        },
                        "break_start_time": {
                          "type": "string",
                          "example": "13:00",
                          "description": "время начала перерыва"
                        },
                        "break_end_time": {
                          "type": "string",
                          "example": "14:00",
                          "description": "время окончания перерыва"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-hours-create"
        },
        "description": "#### Параметры запроса - `day_of_week` — день недели. Доступные значения: ПН, ВТ, СР, ЧТ, ПТ, СБ, ВС - `is_working_day` — флаг, указывающий на то, является ли день рабочим (true) или выходным (false) - `work_start_time` — время начала рабочего дня - `work_end_time` — время завершения рабочего дня - `break_start_time` — время начала перерыва - `break_end_time` — время окончания перерыва",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "day_of_week": {
                    "type": "string",
                    "example": "ПН",
                    "description": "день недели"
                  },
                  "is_working_day": {
                    "type": "boolean",
                    "example": true,
                    "description": "флаг, указывающий на то, является ли день рабочим (true) или выходным (false)"
                  },
                  "work_start_time": {
                    "type": "string",
                    "example": "09:00",
                    "description": "время начала рабочего дня"
                  },
                  "work_end_time": {
                    "type": "string",
                    "example": "18:00",
                    "description": "время завершения рабочего дня"
                  },
                  "break_start_time": {
                    "type": "string",
                    "example": "13:00",
                    "description": "время начала перерыва"
                  },
                  "break_end_time": {
                    "type": "string",
                    "example": "14:00",
                    "description": "время окончания перерыва"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/shops/{id}/hours/{id}": {
      "put": {
        "summary": "Обновление дней и часов работы выбранного магазина",
        "operationId": "shop-hours-update",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hour": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 4,
                          "description": "первичный ключ"
                        },
                        "day_of_week": {
                          "type": "string",
                          "example": "ПН",
                          "description": "день недели"
                        },
                        "is_working_day": {
                          "type": "boolean",
                          "example": true,
                          "description": "флаг, указывающий на то, является ли день рабочим (true) или выходным (false)"
                        },
                        "work_start_time": {
                          "type": "string",
                          "example": "09:00",
                          "description": "время начала рабочего дня"
                        },
                        "work_end_time": {
                          "type": "string",
                          "example": "18:00",
                          "description": "время завершения рабочего дня"
                        },
                        "break_start_time": {
                          "type": "string",
                          "nullable": true
                        },
                        "break_end_time": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-hours-update"
        },
        "description": "#### Параметры запроса - `day_of_week` — день недели. Доступные значения: ПН, ВТ, СР, ЧТ, ПТ, СБ, ВС - `is_working_day` — флаг, указывающий на то, является ли день рабочим (true) или выходным (false) - `work_start_time` — время начала рабочего дня - `work_end_time` — время завершения рабочего дня - `break_start_time` — время начала перерыва - `break_end_time` — время окончания перерыва",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "day_of_week": {
                    "type": "string",
                    "example": "ПН",
                    "description": "день недели"
                  },
                  "is_working_day": {
                    "type": "boolean",
                    "example": true,
                    "description": "флаг, указывающий на то, является ли день рабочим (true) или выходным (false)"
                  },
                  "work_start_time": {
                    "type": "string",
                    "example": "09:00",
                    "description": "время начала рабочего дня"
                  },
                  "work_end_time": {
                    "type": "string",
                    "example": "18:00",
                    "description": "время завершения рабочего дня"
                  },
                  "break_start_time": {
                    "type": "string",
                    "nullable": true
                  },
                  "break_end_time": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление выбранных дней и часов работы магазина",
        "operationId": "shop-hours-delete",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-hours-delete"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/shops/{id}/holidays": {
      "get": {
        "summary": "Получение графика работы в праздничные дни выбранного магазина",
        "operationId": "shop-holidays-list",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "holidays": {
                      "type": "object",
                      "properties": {
                        "work_start_time": {
                          "type": "string",
                          "example": "09:00:00",
                          "description": "время начала рабочего дня"
                        },
                        "work_end_time": {
                          "type": "string",
                          "example": "18:00:00",
                          "description": "время завершения рабочего дня"
                        },
                        "break_start_time": {
                          "type": "string",
                          "nullable": true
                        },
                        "break_end_time": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-holidays-list"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      },
      "post": {
        "summary": "Обновление графика работы в праздничные дни выбранного магазина",
        "operationId": "shop-holidays-update",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "holidays": {
                      "type": "object",
                      "properties": {
                        "work_start_time": {
                          "type": "string",
                          "example": "09:00",
                          "description": "время начала рабочего дня"
                        },
                        "work_end_time": {
                          "type": "string",
                          "example": "18:00",
                          "description": "время завершения рабочего дня"
                        },
                        "break_start_time": {
                          "type": "string",
                          "example": "12:00",
                          "description": "время начала перерыва"
                        },
                        "break_end_time": {
                          "type": "string",
                          "example": "13:00",
                          "description": "время окончания перерыва"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-holidays-update"
        },
        "description": "#### Параметры запроса - `work_start_time` — время начала рабочего дня - `work_end_time` — время завершения рабочего дня - `break_start_time` — время начала перерыва - `break_end_time` — время окончания перерыва",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "work_start_time": {
                    "type": "string",
                    "example": "09:00",
                    "description": "время начала рабочего дня"
                  },
                  "work_end_time": {
                    "type": "string",
                    "example": "18:00",
                    "description": "время завершения рабочего дня"
                  },
                  "break_start_time": {
                    "type": "string",
                    "example": "12:00",
                    "description": "время начала перерыва"
                  },
                  "break_end_time": {
                    "type": "string",
                    "example": "13:00",
                    "description": "время окончания перерыва"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/shops/{id}/exceptions": {
      "get": {
        "summary": "Получение списка дней-исключений в работе выбранного магазина",
        "operationId": "shop-exceptions-list",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "exceptions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "exception_start_date": {
                            "type": "string",
                            "format": "date",
                            "example": "2024-08-10",
                            "description": "дата начала периода выходных дней"
                          },
                          "exception_end_date": {
                            "type": "string",
                            "format": "date",
                            "example": "2024-08-12",
                            "description": "дата окончания периода выходных дней"
                          }
                        }
                      }
                    },
                    "exceptionsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-exceptions-list"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      },
      "post": {
        "summary": "Добавление промежутка дней-исключений для выбранного магазина",
        "operationId": "shop-exception-create",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "exception": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "exception_start_date": {
                          "type": "string",
                          "format": "date",
                          "example": "2024-08-10",
                          "description": "дата начала периода выходных дней"
                        },
                        "exception_end_date": {
                          "type": "string",
                          "format": "date",
                          "example": "2024-08-12",
                          "description": "дата окончания периода выходных дней"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-exception-create"
        },
        "description": "#### Параметры запроса - `exception_start_date` — дата начала периода выходных дней - `exception_end_date` — дата окончания периода выходных дней",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "exception_start_date": {
                    "type": "string",
                    "format": "date",
                    "example": "2024-08-10",
                    "description": "дата начала периода выходных дней"
                  },
                  "exception_end_date": {
                    "type": "string",
                    "format": "date",
                    "example": "2024-08-12",
                    "description": "дата окончания периода выходных дней"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/shops/{id}/exceptions/{id}": {
      "put": {
        "summary": "Обновление промежутка дней-исключений для выбранного магазина",
        "operationId": "shop-exception-update",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "exception": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "exception_start_date": {
                          "type": "string",
                          "format": "date",
                          "example": "2024-08-10",
                          "description": "дата начала периода выходных дней"
                        },
                        "exception_end_date": {
                          "type": "string",
                          "format": "date",
                          "example": "2024-08-12",
                          "description": "дата окончания периода выходных дней"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-exception-update"
        },
        "description": "#### Параметры запроса - `exception_start_date` — дата начала периода выходных дней - `exception_end_date` — дата окончания периода выходных дней",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "exception_start_date": {
                    "type": "string",
                    "format": "date",
                    "example": "2024-08-10",
                    "description": "дата начала периода выходных дней"
                  },
                  "exception_end_date": {
                    "type": "string",
                    "format": "date",
                    "example": "2024-08-12",
                    "description": "дата окончания периода выходных дней"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление промежутка дней-исключения для выбранного магазина",
        "operationId": "shop-exception-delete",
        "tags": [
          "ERP / Магазины"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Магазины/#shop-exception-delete"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/menus": {
      "get": {
        "summary": "Меню текущего пользователя",
        "operationId": "menu-get",
        "tags": [
          "ERP / Меню"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "menus": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Главное меню"
                          },
                          "is_default": {
                            "type": "boolean",
                            "example": true
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-03-27T07:00:46.000000Z"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Меню/#menu-get"
        },
        "description": "Возвращает корневое меню текущего авторизованного пользователя (определяется по Bearer токену)."
      }
    },
    "/api/menus/default/items": {
      "get": {
        "summary": "Пункты меню по умолчанию",
        "operationId": "menu-default-items",
        "tags": [
          "ERP / Меню"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "menuItems": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "ID пункта"
                          },
                          "menu_id": {
                            "type": "integer",
                            "example": 1,
                            "description": "ID меню-владельца"
                          },
                          "parent_id": {
                            "type": "string",
                            "nullable": true
                          },
                          "avatar": {
                            "type": "string",
                            "format": "uri",
                            "example": "https://api.gigma.ru/storage/uploads/dashboard.svg",
                            "description": "URL иконки"
                          },
                          "name": {
                            "type": "string",
                            "example": "Дашборд",
                            "description": "отображаемое название"
                          },
                          "url": {
                            "type": "string",
                            "example": "/dashboard",
                            "description": "путь, на который ведёт пункт (опционально, у группирующих пунктов отсутствует)"
                          },
                          "children": {
                            "type": "array",
                            "items": {}
                          }
                        }
                      }
                    },
                    "menuItemsCount": {
                      "type": "integer",
                      "example": 3,
                      "description": "общее количество пунктов"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Меню/#menu-default-items"
        },
        "description": "Возвращает дерево пунктов меню по умолчанию (то, что показывается в sidebar админки)."
      }
    },
    "/api/users/{id}/attach_menu": {
      "post": {
        "summary": "Скопировать меню текущего пользователя указанному",
        "operationId": "attach-menu-user",
        "tags": [
          "ERP / Меню"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Menu has been attached."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Меню/#attach-menu-user"
        },
        "description": "Берёт меню текущего (авторизованного) пользователя и привязывает его к пользователю с указанным `id`. Тело запроса пустое — оба меню определяются из контекста: текущий пользователь по токену, целевой по URL."
      }
    },
    "/api/attach_menu_to_project": {
      "post": {
        "summary": "Скопировать меню текущего пользователя всем пользователям проекта",
        "operationId": "attach-menu-project",
        "tags": [
          "ERP / Меню"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Menu has been attached."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Меню/#attach-menu-project"
        },
        "description": "Берёт меню текущего пользователя и применяет его ко всем пользователям его текущего проекта (бизнеса)."
      }
    },
    "/api/users/{id}/create_menu_from_user_items": {
      "post": {
        "summary": "Сохранить меню пользователя как шаблон",
        "operationId": "create-menu-from-user",
        "tags": [
          "ERP / Меню"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Menu has been created."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Меню/#create-menu-from-user"
        },
        "description": "Создаёт новое именованное меню (шаблон) на основе текущего меню указанного пользователя.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "Главное меню (Retail)",
                    "description": "название нового меню"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/tables/categories": {
      "get": {
        "summary": "Получение списка категорий",
        "operationId": "categories-list",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#categories-list"
        },
        "description": "#### Параметры запроса - `page` — текущая страница (пагинация) - `per_page` — количество элементов на странице - `query` — поисковая строка - `date_from` — фильтр по дате добавления (от) - `date_to` — фильтр по дате добавления (до)"
      }
    },
    "/api/tables/categories/{id}": {
      "get": {
        "summary": "Получение выбранной категории",
        "operationId": "category-get",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#category-get"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`. Возвращает один объект категории с полями: `id`, `code`, `name`, `description`, `parent`, `photo`, `avatar`, `tags`."
      }
    },
    "/api/categories/{id}": {
      "put": {
        "summary": "Обновление выбранной категории",
        "operationId": "category-update",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#category-update"
        },
        "description": "#### Параметры запроса - `code` — уникальный системный код - `name` — название категории - `description` — описание в формате HTML - `parent_id` — родительская категория - `avatar_id` — ID файла аватара - `photo_id` — ID файла фотографии - `tag_id[]` — массив ID тегов"
      }
    },
    "/api/categories": {
      "post": {
        "summary": "Добавление категории",
        "operationId": "category-add",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "category": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 17
                        },
                        "code": {
                          "type": "string",
                          "example": "CAT-001",
                          "description": "уникальный системный код категории"
                        },
                        "name": {
                          "type": "string",
                          "example": "Косметика",
                          "description": "название категории"
                        },
                        "description": {
                          "type": "string",
                          "example": "<p>Категория косметической продукции</p>",
                          "description": "описание в формате HTML"
                        },
                        "parent": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Товары для дома",
                              "description": "название категории"
                            }
                          }
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 42
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/abc.jpg"
                            }
                          }
                        },
                        "photo": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 43
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/def.jpg"
                            }
                          }
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "новинка",
                                "description": "название категории"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-05-16T07:00:00.000000Z"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-05-16T07:00:00.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#category-add"
        },
        "description": "#### Параметры запроса ⚠ Реальный minimum (сверено): только `name`. `code` рекомендуется задавать вручную для дедупа, но бэкенд его не требует. - `name` *(string, обязательно)* — название категории - `code` *(string, опционально)* — уникальный системный код категории - `description` *(string, опционально)* — описание в формате HTML - `parent_id` *(int, опционально)* — ID родительской категории (для вложенности) - `avatar_id` *(int, опционально)* — ID файла аватара (из `POST /api/files`) - `photo_id` *(int, опционально)* — ID файла основной фотографии - `tag_id` *(int[], опционально)* — массив ",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "CAT-001",
                    "description": "уникальный системный код категории"
                  },
                  "name": {
                    "type": "string",
                    "example": "Косметика",
                    "description": "название категории"
                  },
                  "description": {
                    "type": "string",
                    "example": "<p>Категория косметической продукции</p>",
                    "description": "описание в формате HTML"
                  },
                  "parent_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID родительской категории (для вложенности)"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 42,
                    "description": "ID файла аватара (из POST /api/files)"
                  },
                  "photo_id": {
                    "type": "integer",
                    "example": 43,
                    "description": "ID файла основной фотографии"
                  },
                  "tag_id": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        }
      }
    },
    "/api/categories/{id}/history": {
      "get": {
        "summary": "Получение истории изменений категории",
        "operationId": "category-history",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#category-history"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`. Возвращает массив объектов истории с полями: `id`, `icon`, `color`, `title`, `description`, `datetime`, `historiesCount`."
      }
    },
    "/api/tags": {
      "get": {
        "summary": "Получение списка тегов",
        "operationId": "tags-list",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#tags-list"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`. Возвращает массив тегов с полями: `id`, `name`, `avatar` (URL), `created_at`, `tagsCount`."
      }
    },
    "/api/nomenclature_types": {
      "get": {
        "summary": "Получение списка типов номенклатуры",
        "operationId": "nomenclature-types",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#nomenclature-types"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`. Возвращает типы номенклатуры с полями: `id`, `name`, `avatar`, `created_at`, `nomenclatureTypesCount`."
      }
    },
    "/api/nomenclature_kinds": {
      "get": {
        "summary": "Получение списка видов номенклатуры",
        "operationId": "nomenclature-kinds",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#nomenclature-kinds"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`. Возвращает массив видов с полями: `id`, `name`, `avatar`, `created_at`, `nomenclatureKindsCount`."
      }
    },
    "/api/tables/nomenclatures": {
      "get": {
        "summary": "Получение списка номенклатуры (табличное представление)",
        "operationId": "nomenclatures-table",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#nomenclatures-table"
        },
        "description": "#### Параметры запроса - `query` — поисковая строка - `type_id[]` — фильтр по ID типов - `kind_id[]` — фильтр по ID видов - `is_import` — boolean (1 — импортные, 0 — отечественные)"
      }
    },
    "/api/nomenclatures": {
      "get": {
        "summary": "Получение списка номенклатуры",
        "operationId": "nomenclatures-list",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#nomenclatures-list"
        },
        "description": "#### Параметры запроса Те же параметры, что и для табличного представления, плюс `page` и `per_page`.",
        "x-used-in": [
          "17.7"
        ]
      },
      "post": {
        "summary": "Добавление позиции номенклатуры",
        "operationId": "nomenclature-add",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "nomenclature": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 100
                        },
                        "code": {
                          "type": "string",
                          "example": "SKU-001",
                          "description": "уникальный SKU позиции (рекомендуется ставить вручную)"
                        },
                        "name": {
                          "type": "string",
                          "example": "Крем для лица «Нежность»",
                          "description": "наименование позиции"
                        },
                        "kind": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "name": {
                              "type": "string",
                              "example": "Товар",
                              "description": "наименование позиции"
                            }
                          }
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Простой",
                              "description": "наименование позиции"
                            }
                          }
                        },
                        "unit": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Штука",
                              "description": "наименование позиции"
                            }
                          }
                        },
                        "vat": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "rate": {
                              "type": "integer",
                              "example": 20
                            }
                          }
                        },
                        "price": {
                          "type": "string",
                          "format": "decimal",
                          "example": "1000.00",
                          "description": "цена в формате decimal-string, 2 знака (1000.00). Для услуг — обязательно по бизнес-логике."
                        },
                        "cost_price": {
                          "type": "string",
                          "format": "decimal",
                          "example": "700.00",
                          "description": "себестоимость, decimal-string"
                        },
                        "markup": {
                          "type": "integer",
                          "example": 30,
                          "description": "процент наценки"
                        },
                        "discount": {
                          "type": "integer",
                          "example": 0,
                          "description": "процент скидки"
                        },
                        "category": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 17
                            },
                            "name": {
                              "type": "string",
                              "example": "Косметика",
                              "description": "наименование позиции"
                            }
                          }
                        },
                        "brand": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 7
                            },
                            "name": {
                              "type": "string",
                              "example": "Nivea",
                              "description": "наименование позиции"
                            }
                          }
                        },
                        "country": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3
                            },
                            "name": {
                              "type": "string",
                              "example": "Россия",
                              "description": "наименование позиции"
                            }
                          }
                        },
                        "branch": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 5
                            },
                            "name": {
                              "type": "string",
                              "example": "Главный филиал",
                              "description": "наименование позиции"
                            }
                          }
                        },
                        "description": {
                          "type": "string",
                          "example": "<p>...</p>",
                          "description": "HTML-описание для карточки"
                        },
                        "specification": {
                          "type": "string",
                          "example": "<p>...</p>",
                          "description": "HTML-характеристики"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 42
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/avatar.jpg"
                            }
                          }
                        },
                        "preview": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 43
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/preview.jpg"
                            }
                          }
                        },
                        "photos": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 44
                              },
                              "path": {
                                "type": "string",
                                "format": "uri",
                                "example": "https://api.gigma.ru/storage/uploads/p1.jpg"
                              },
                              "order": {
                                "type": "integer",
                                "example": 1
                              }
                            }
                          }
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "новинка",
                                "description": "наименование позиции"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-05-16T07:00:00.000000Z"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-05-16T07:00:00.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#nomenclature-add"
        },
        "description": "#### Параметры запроса ⚠ **Реальный minimum** (сверено через `POST {}` → 422): `name` + `kind_id`. Остальные технически опциональны, но для боевого создания обычно нужны `code`, `type_id`, `storage_unit_id`, `vat_id`, `price`. - `name` *(string, обязательно)* — наименование позиции - `kind_id` *(int, обязательно)* — ID вида (1=Услуга, 2=Товар; `GET /api/nomenclature_kinds`) - `code` *(string, опционально)* — уникальный SKU позиции (рекомендуется ставить вручную) - `type_id` *(int, опционально)* — ID типа (`GET /api/nomenclature_types`) - `storage_unit_id` *(int, опционально)* — ID единицы изме",
        "x-used-in": [
          "17.3",
          "17.7"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "SKU-001",
                    "description": "уникальный SKU позиции (рекомендуется ставить вручную)"
                  },
                  "name": {
                    "type": "string",
                    "example": "Крем для лица «Нежность»",
                    "description": "наименование позиции"
                  },
                  "kind_id": {
                    "type": "integer",
                    "example": 2,
                    "enum": [
                      1,
                      2
                    ],
                    "x-enum-varnames": [
                      "Услуга",
                      "Товар"
                    ],
                    "description": "Вид номенклатуры. См. /enums#nomenclature-kinds Получить актуальные значения: `GET /api/nomenclature_kinds`"
                  },
                  "type_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID типа (GET /api/nomenclature_types)"
                  },
                  "storage_unit_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Единица измерения. **НЕ** /api/units. Запись имеет только {id, name, abbreviation} — без avatar/created_at. Получить актуальные значения: `GET /api/storage_units`"
                  },
                  "vat_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "Ставка НДС. **НЕ** /api/vat (singular). См. /enums#dictionary-sources Получить актуальные значения: `GET /api/vats`"
                  },
                  "price": {
                    "type": "string",
                    "format": "decimal",
                    "example": "1000.00",
                    "description": "цена в формате decimal-string, 2 знака (1000.00). Для услуг — обязательно по бизнес-логике."
                  },
                  "category_id": {
                    "type": "integer",
                    "example": 17,
                    "description": "Категория номенклатуры Получить актуальные значения: `GET /api/categories`"
                  },
                  "brand_id": {
                    "type": "integer",
                    "example": 7,
                    "description": "Бренд Получить актуальные значения: `GET /api/brands`"
                  },
                  "country_id": {
                    "type": "integer",
                    "example": 3,
                    "description": "Страна Получить актуальные значения: `GET /api/countries`"
                  },
                  "branch_id": {
                    "type": "integer",
                    "example": 5,
                    "description": "Бизнес/филиал. **НЕ** /api/businesses Получить актуальные значения: `GET /api/branches`"
                  },
                  "description": {
                    "type": "string",
                    "example": "<p>Увлажняющий крем с гиалуроновой кислотой.</p>",
                    "description": "HTML-описание для карточки"
                  },
                  "specification": {
                    "type": "string",
                    "example": "<p>Объём: 50 мл. Срок годности: 24 месяца.</p>",
                    "description": "HTML-характеристики"
                  },
                  "cost_price": {
                    "type": "string",
                    "format": "decimal",
                    "example": "700.00",
                    "description": "себестоимость, decimal-string"
                  },
                  "markup": {
                    "type": "integer",
                    "example": 30,
                    "description": "процент наценки"
                  },
                  "discount": {
                    "type": "integer",
                    "example": 0,
                    "description": "процент скидки"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 42,
                    "description": "ID файла-аватара (из POST /api/files c file_type_id=2)"
                  },
                  "preview_id": {
                    "type": "integer",
                    "example": 43,
                    "description": "ID файла превью-картинки"
                  },
                  "photos": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "photo_id": {
                          "type": "integer",
                          "example": 44
                        },
                        "order": {
                          "type": "integer",
                          "example": 1
                        }
                      }
                    }
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                },
                "required": [
                  "name",
                  "kind_id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/nomenclatures/{id}": {
      "put": {
        "summary": "Обновление позиции номенклатуры",
        "operationId": "nomenclature-update",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#nomenclature-update"
        },
        "description": "#### Параметры запроса Те же параметры, что и в эндпоинте добавления."
      },
      "get": {
        "summary": "Получение выбранной позиции номенклатуры",
        "operationId": "nomenclature-get",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#nomenclature-get"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`. Возвращает полный объект позиции со всеми полями: `id`, `code`, `name`, `avatar`, `preview`, `description`, `category`, `specification`, `country`, `type`, `kind`, `branch`, `tags`, `photos`, `unit`, `brand`, `price`, `cost_price`, `discount`, `vat`, `markup`, `pieces_per_pack`, `is_subscription`, `billing_period_months`, `parent_nomenclature_id`, `variant_label`, `variant_sort_order`, временные метки."
      }
    },
    "/api/nomenclatures/{id}/history": {
      "get": {
        "summary": "Получение истории изменений позиции номенклатуры",
        "operationId": "nomenclature-history",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#nomenclature-history"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`. Возвращает массив истории с полями: `id`, `icon`, `color`, `title`, `description`, `datetime`."
      }
    },
    "/api/nomenclatures/export": {
      "post": {
        "summary": "Экспорт файла номенклатуры",
        "operationId": "nomenclature-export",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#nomenclature-export"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/nomenclatures/import": {
      "post": {
        "summary": "Импорт файла номенклатуры",
        "operationId": "nomenclature-import",
        "tags": [
          "ERP / Номенклатура"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Номенклатура/#nomenclature-import"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` со статусом импорта и описанием полей."
      }
    },
    "/api/tables/inventories": {
      "get": {
        "summary": "Получение списка остатков (табличное представление)",
        "operationId": "inventories-table",
        "tags": [
          "ERP / Остатки"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Остатки/#inventories-table"
        },
        "description": "#### Параметры запроса - `query` — поисковая строка - `owned_by_us` — иерархия складов (true/false) - `warehouse_id[]` — массив ID складов - `type_id[]` — массив ID типов товаров - `city_id[]` — массив ID городов - `brand_id[]` — массив ID производителей - `vat_id[]` — ID НДС - `application_id[]` — ID приложения"
      }
    },
    "/api/inventories": {
      "get": {
        "summary": "Получение списка остатков (JSON)",
        "operationId": "inventories-list",
        "tags": [
          "ERP / Остатки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Остатки/#inventories-list"
        },
        "description": "⚠ **Backend bug:** на боевых данных возвращает `IncompleteRead(0 bytes read)` — запрос обрывается без ответа. Причина: нет пагинации (`->get()` без `->paginate()`), при большом каталоге сервер не успевает отдать весь ответ. Пока не починено — используй табличный эндпоинт с пагинацией (`GET /api/tables/inventories?per_page=50`)."
      },
      "post": {
        "summary": "Создание записи остатка",
        "operationId": "inventory-create",
        "tags": [
          "ERP / Остатки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "inventory": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 200
                        },
                        "code": {
                          "type": "string",
                          "example": "INV-001",
                          "description": "код позиции остатка"
                        },
                        "warehouse": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 5
                            },
                            "name": {
                              "type": "string",
                              "example": "Главный склад"
                            }
                          }
                        },
                        "nomenclature": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 100
                            },
                            "name": {
                              "type": "string",
                              "example": "Крем для лица «Нежность»"
                            },
                            "code": {
                              "type": "string",
                              "example": "SKU-001",
                              "description": "код позиции остатка"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/avatar.jpg"
                            }
                          }
                        },
                        "counterparty": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 3
                            },
                            "name": {
                              "type": "string",
                              "example": "ООО Поставщик"
                            },
                            "inn": {
                              "type": "string",
                              "example": "7712345678"
                            },
                            "type_id": {
                              "type": "integer",
                              "example": 1
                            }
                          }
                        },
                        "invoice": {
                          "type": "object",
                          "properties": {
                            "number": {
                              "type": "string",
                              "example": "РН-001"
                            },
                            "date": {
                              "type": "string",
                              "format": "date",
                              "example": "2026-05-16"
                            },
                            "row_number": {
                              "type": "integer",
                              "example": 1
                            }
                          }
                        },
                        "vat": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2
                            },
                            "name": {
                              "type": "string",
                              "example": "НДС 20%"
                            }
                          }
                        },
                        "vat_rate": {
                          "type": "string",
                          "example": "20%"
                        },
                        "vat_amount": {
                          "type": "string",
                          "format": "decimal",
                          "example": "166.67"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 50,
                          "description": "количество в штуках, неотрицательное целое"
                        },
                        "price": {
                          "type": "string",
                          "format": "decimal",
                          "example": "1000.00",
                          "description": "цена в формате decimal-string, 2 знака (1000.00)"
                        },
                        "line_total_without_vat": {
                          "type": "string",
                          "format": "decimal",
                          "example": "50000.00"
                        },
                        "line_total_with_vat": {
                          "type": "string",
                          "format": "decimal",
                          "example": "50000.00"
                        },
                        "currency_code": {
                          "type": "string",
                          "example": "RUB"
                        },
                        "discount": {
                          "type": "integer",
                          "example": 0,
                          "description": "процент скидки, 0–100"
                        },
                        "markup": {
                          "type": "integer",
                          "example": 30,
                          "description": "процент наценки"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-05-16T07:00:00.000000Z"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-05-16T07:00:00.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Остатки/#inventory-create"
        },
        "description": "#### Параметры запроса ⚠ Реальный minimum (сверено): `nomenclature_id` + `warehouse_id`. Остальные опциональны на уровне валидатора, но `quantity` и `price` обязательны по смыслу. - `nomenclature_id` *(int, обязательно)* — ID номенклатуры (`GET /api/nomenclatures`) - `warehouse_id` *(int, обязательно)* — ID склада (`GET /api/warehouses`) - `code` *(string, опционально)* — код позиции остатка - `vat_id` *(int, опционально)* — ID ставки НДС (`GET /api/vats`) - `quantity` *(int, опционально)* — количество в штуках, неотрицательное целое - `price` *(string, опционально)* — цена в формате decimal-s",
        "x-used-in": [
          "17.7"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "INV-001",
                    "description": "код позиции остатка"
                  },
                  "warehouse_id": {
                    "type": "integer",
                    "example": 5,
                    "description": "Склад. ⚠ endpoint неверифицирован Получить актуальные значения: `GET /api/warehouses`"
                  },
                  "nomenclature_id": {
                    "type": "integer",
                    "example": 100,
                    "description": "ID номенклатуры (GET /api/nomenclatures)"
                  },
                  "vat_id": {
                    "type": "integer",
                    "example": 2,
                    "description": "Ставка НДС. **НЕ** /api/vat (singular). См. /enums#dictionary-sources Получить актуальные значения: `GET /api/vats`"
                  },
                  "quantity": {
                    "type": "integer",
                    "example": 50,
                    "description": "количество в штуках, неотрицательное целое"
                  },
                  "price": {
                    "type": "string",
                    "format": "decimal",
                    "example": "1000.00",
                    "description": "цена в формате decimal-string, 2 знака (1000.00)"
                  },
                  "discount": {
                    "type": "integer",
                    "example": 0,
                    "description": "процент скидки, 0–100"
                  },
                  "markup": {
                    "type": "integer",
                    "example": 30,
                    "description": "процент наценки"
                  }
                },
                "required": [
                  "warehouse_id",
                  "nomenclature_id"
                ]
              }
            }
          }
        }
      }
    },
    "/api/inventories/{id}": {
      "put": {
        "summary": "Обновление записи остатка",
        "operationId": "inventory-update",
        "tags": [
          "ERP / Остатки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Остатки/#inventory-update"
        },
        "description": "#### Параметры запроса Те же параметры, что и в эндпоинте создания."
      },
      "get": {
        "summary": "Получение выбранного остатка",
        "operationId": "inventory-get",
        "tags": [
          "ERP / Остатки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Остатки/#inventory-get"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с полной информацией о складе, номенклатуре, количестве, цене и НДС."
      }
    },
    "/api/inventories/{id}/history": {
      "get": {
        "summary": "Получение истории изменений остатка",
        "operationId": "inventory-history",
        "tags": [
          "ERP / Остатки"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Остатки/#inventory-history"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с записями истории, содержащими `icon`, `color`, `title`, `description`, `datetime`."
      }
    },
    "/api/inventories/upload": {
      "post": {
        "summary": "Импорт остатков",
        "operationId": "inventories-import",
        "tags": [
          "ERP / Остатки"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Import successful"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Остатки/#inventories-import"
        },
        "description": "Два режима в зависимости от `Content-Type`. В обоих режимах `warehouse_id` обязателен. **Режим А** (`multipart/form-data`): передаётся `file` — Excel `.xmr`. **Режим Б** (`application/json`): передаётся `items[]` с полями накладной. ⚠ Реальный minimum (сверено через `POST {}` → 422): `warehouse_id` + (`file` **или** `items[]` со всеми полями ниже).",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  },
                  "warehouse_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Склад. ⚠ endpoint неверифицирован Получить актуальные значения: `GET /api/warehouses`"
                  },
                  "invoice_number": {
                    "type": "string",
                    "example": "РН-001",
                    "description": "номер накладной; обязателен в режиме Б."
                  },
                  "invoice_date": {
                    "type": "string",
                    "format": "date",
                    "example": "2026-05-16",
                    "description": "дата накладной ISO 8601 (2026-05-16); обязателен в режиме Б."
                  },
                  "supplier_inn": {
                    "type": "string",
                    "example": "7712345678",
                    "description": "ИНН поставщика; обязателен в режиме Б."
                  },
                  "supplier_name": {
                    "type": "string",
                    "example": "ООО Поставщик",
                    "description": "наименование поставщика; обязателен в режиме Б."
                  },
                  "currency_code": {
                    "type": "string",
                    "example": "RUB",
                    "description": "код валюты ISO 4217 (RUB); обязателен в режиме Б."
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "row_number": {
                          "type": "integer",
                          "example": 1,
                          "description": "порядковый номер строки"
                        },
                        "item_name": {
                          "type": "string",
                          "example": "Микрофон Shure SM58",
                          "description": "наименование товара"
                        },
                        "quantity": {
                          "type": "integer",
                          "example": 5,
                          "description": "количество"
                        },
                        "price": {
                          "type": "string",
                          "format": "decimal",
                          "example": "4000.00",
                          "description": "цена за единицу, decimal-string (4000.00)"
                        },
                        "sum_without_vat": {
                          "type": "string",
                          "format": "decimal",
                          "example": "20000.00",
                          "description": "сумма без НДС, decimal-string"
                        },
                        "sum_with_vat": {
                          "type": "string",
                          "format": "decimal",
                          "example": "20000.00",
                          "description": "сумма с НДС, decimal-string"
                        },
                        "vat_rate": {
                          "type": "string",
                          "example": "0%",
                          "description": "ставка НДС: 0%, 10%, 20%"
                        }
                      },
                      "required": [
                        "row_number",
                        "item_name",
                        "quantity",
                        "price",
                        "sum_without_vat",
                        "sum_with_vat",
                        "vat_rate"
                      ]
                    }
                  }
                },
                "required": [
                  "file",
                  "warehouse_id"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "warehouse_id",
                  "invoice_number",
                  "invoice_date",
                  "supplier_inn",
                  "supplier_name",
                  "currency_code",
                  "items"
                ],
                "properties": {
                  "warehouse_id": {
                    "type": "integer",
                    "description": "ID склада из GET /api/warehouses. Обязателен в обоих режимах.",
                    "example": 1
                  },
                  "invoice_number": {
                    "type": "string",
                    "description": "Номер накладной",
                    "example": "РН-001"
                  },
                  "invoice_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Дата накладной (YYYY-MM-DD)",
                    "example": "2026-05-16"
                  },
                  "supplier_inn": {
                    "type": "string",
                    "description": "ИНН поставщика",
                    "example": "7712345678"
                  },
                  "supplier_name": {
                    "type": "string",
                    "description": "Наименование поставщика",
                    "example": "ООО Поставщик"
                  },
                  "currency_code": {
                    "type": "string",
                    "description": "Код валюты ISO 4217",
                    "example": "RUB"
                  },
                  "items": {
                    "type": "array",
                    "description": "Строки накладной. Обязательны когда нет file.",
                    "items": {
                      "type": "object",
                      "required": [
                        "row_number",
                        "item_name",
                        "quantity",
                        "price",
                        "sum_without_vat",
                        "sum_with_vat",
                        "vat_rate"
                      ],
                      "properties": {
                        "row_number": {
                          "type": "integer",
                          "description": "Порядковый номер строки в накладной",
                          "example": 1
                        },
                        "item_name": {
                          "type": "string",
                          "description": "Наименование товара",
                          "example": "Микрофон Shure SM58"
                        },
                        "quantity": {
                          "type": "number",
                          "description": "Количество",
                          "example": 5
                        },
                        "price": {
                          "type": "string",
                          "description": "Цена за единицу (decimal-string)",
                          "example": "4000.00"
                        },
                        "sum_without_vat": {
                          "type": "string",
                          "description": "Сумма без НДС (decimal-string)",
                          "example": "20000.00"
                        },
                        "sum_with_vat": {
                          "type": "string",
                          "description": "Сумма с НДС (decimal-string)",
                          "example": "20000.00"
                        },
                        "vat_rate": {
                          "type": "string",
                          "description": "Ставка НДС: \"0%\", \"10%\", \"20%\"",
                          "example": "0%"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/managers": {
      "get": {
        "summary": "Список менеджеров (упрощённый)",
        "operationId": "managers-list",
        "tags": [
          "ERP / Пользователи"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "managers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Полищук Артём"
                          }
                        }
                      }
                    },
                    "managersCount": {
                      "type": "integer",
                      "example": 2,
                      "description": "общее количество"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Пользователи/#managers-list"
        },
        "description": "Минимальный список пользователей, имеющих роль менеджера. Используется в фильтрах таблиц контрагентов, заказов и т.п."
      }
    },
    "/api/applications": {
      "get": {
        "summary": "Получение списка приложений",
        "operationId": "applications-list",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#applications-list"
        },
        "description": "#### Параметры запроса - `page` — текущая страница - `per_page` — количество элементов на странице - `query` — поисковая строка - `date_from` — фильтр по дате (от) - `date_to` — фильтр по дате (до)"
      }
    },
    "/api/applications/{id}": {
      "get": {
        "summary": "Получение выбранного приложения",
        "operationId": "application-get",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "application": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "branch": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 5
                            },
                            "name": {
                              "type": "string",
                              "example": "Главный филиал",
                              "description": "название приложения"
                            }
                          },
                          "description": "объект филиала (id, name)"
                        },
                        "is_website": {
                          "type": "boolean",
                          "example": false,
                          "description": "является ли приложение сайтом"
                        },
                        "photo": {
                          "type": "string",
                          "nullable": true
                        },
                        "code": {
                          "type": "string",
                          "example": "APP-001",
                          "description": "уникальный код приложения"
                        },
                        "name": {
                          "type": "string",
                          "example": "Интернет-магазин",
                          "description": "название приложения"
                        },
                        "is_token_active": {
                          "type": "boolean",
                          "example": true,
                          "description": "активен ли API-токен приложения"
                        },
                        "wholesale": {
                          "type": "boolean",
                          "example": false,
                          "description": "работает ли приложение в оптовом режиме"
                        },
                        "token": {
                          "type": "string",
                          "example": "abc123token",
                          "description": "API-токен приложения для E-Commerce запросов"
                        },
                        "success_payment_url": {
                          "type": "string",
                          "format": "uri",
                          "example": "https://myshop.ru/success",
                          "description": "URL редиректа после успешной оплаты"
                        },
                        "warehouses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 3
                              },
                              "name": {
                                "type": "string",
                                "example": "Склад №1",
                                "description": "название приложения"
                              }
                            }
                          }
                        },
                        "sales_strategy": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Стандартная",
                              "description": "название приложения"
                            }
                          },
                          "description": "стратегия продаж (id, name)"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-get"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/applications/{id}/webhooks": {
      "get": {
        "summary": "Получение списка вебхуков",
        "operationId": "application-webhooks-list",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-webhooks-list"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с массивом вебхуков приложения."
      },
      "post": {
        "summary": "Создание вебхука",
        "operationId": "application-webhook-create",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-webhook-create"
        },
        "description": "#### Параметры запроса - `url` *(string, обязательно)* — URL для отправки вебхуков - `events` *(string[], опционально)* — массив подписанных событий"
      }
    },
    "/api/applications/{id}/webhooks/{webhook_id}": {
      "get": {
        "summary": "Получение выбранного вебхука",
        "operationId": "application-webhook-get",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-webhook-get"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с объектом вебхука."
      },
      "patch": {
        "summary": "Обновление вебхука",
        "operationId": "application-webhook-update",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-webhook-update"
        },
        "description": "#### Параметры запроса Те же параметры, что и при создании (частичное обновление)."
      },
      "delete": {
        "summary": "Удаление вебхука",
        "operationId": "application-webhook-delete",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-webhook-delete"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/applications/{id}/webhooks/{webhook_id}/deliveries": {
      "get": {
        "summary": "Получение доставок вебхука",
        "operationId": "application-webhook-deliveries",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-webhook-deliveries"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с историей доставок вебхука."
      }
    },
    "/api/applications/{id}/webhooks/{webhook_id}/resend": {
      "post": {
        "summary": "Повторная доставка вебхука",
        "operationId": "application-webhook-resend",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-webhook-resend"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/applications/{id}/webhooks/{webhook_id}/rotate-secret": {
      "post": {
        "summary": "Ротация секрета вебхука",
        "operationId": "application-webhook-rotate-secret",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-webhook-rotate-secret"
        },
        "description": "Генерирует новый секрет для подписи полезной нагрузки вебхука."
      }
    },
    "/api/tables/applications/{id}/categories": {
      "get": {
        "summary": "Получение списка категорий приложения (табличное)",
        "operationId": "application-categories-table",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-categories-table"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/applications/{id}/categories": {
      "get": {
        "summary": "Получение списка категорий приложения",
        "operationId": "application-categories-list",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-categories-list"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      },
      "post": {
        "summary": "Добавление категории в приложение",
        "operationId": "application-category-add",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-category-add"
        },
        "description": "#### Параметры запроса - `category_id` — ID категории"
      }
    },
    "/api/applications/{id}/categories/{category_id}": {
      "get": {
        "summary": "Получение категории приложения",
        "operationId": "application-category-get",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-category-get"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      },
      "delete": {
        "summary": "Удаление категории из приложения",
        "operationId": "application-category-delete",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-category-delete"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с сообщением подтверждения."
      }
    },
    "/api/applications/{id}/categories/{category_id}/up": {
      "post": {
        "summary": "Повышение приоритета категории",
        "operationId": "application-category-up",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-category-up"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/applications/{id}/categories/{category_id}/down": {
      "post": {
        "summary": "Понижение приоритета категории",
        "operationId": "application-category-down",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "category_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-category-down"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/tables/applications/{id}/brands": {
      "get": {
        "summary": "Получение списка брендов приложения (табличное)",
        "operationId": "application-brands-table",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-brands-table"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/applications/{id}/brands": {
      "get": {
        "summary": "Получение списка брендов приложения",
        "operationId": "application-brands-list",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-brands-list"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      },
      "post": {
        "summary": "Добавление бренда в приложение",
        "operationId": "application-brand-add",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-brand-add"
        },
        "description": "#### Параметры запроса - `brand_id` — ID бренда"
      }
    },
    "/api/applications/{id}/brands/{brand_id}": {
      "get": {
        "summary": "Получение бренда приложения",
        "operationId": "application-brand-get",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "brand_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-brand-get"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      },
      "delete": {
        "summary": "Удаление бренда из приложения",
        "operationId": "application-brand-delete",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "brand_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-brand-delete"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с сообщением подтверждения."
      }
    },
    "/api/applications/{id}/brands/{brand_id}/up": {
      "post": {
        "summary": "Повышение приоритета бренда",
        "operationId": "application-brand-up",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "brand_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-brand-up"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/applications/{id}/brands/{brand_id}/down": {
      "post": {
        "summary": "Понижение приоритета бренда",
        "operationId": "application-brand-down",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "brand_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-brand-down"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/tables/applications/{id}/menu_items": {
      "get": {
        "summary": "Получение списка пунктов меню (табличное)",
        "operationId": "application-menu-items-table",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-menu-items-table"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/applications/{id}/menu_items": {
      "post": {
        "summary": "Создание пункта меню",
        "operationId": "application-menu-item-create",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-menu-item-create"
        },
        "description": "#### Параметры запроса - `name` — название пункта меню - `slug` — slug - `parent_id` — ID родительского пункта - `avatar_id` — ID файла аватара - `preview_id` — ID файла превью"
      }
    },
    "/api/applications/{id}/menu_items/{menu_item_id}": {
      "put": {
        "summary": "Обновление пункта меню",
        "operationId": "application-menu-item-update",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "menu_item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-menu-item-update"
        },
        "description": "#### Параметры запроса Те же параметры, что и в эндпоинте создания."
      },
      "delete": {
        "summary": "Удаление пункта меню",
        "operationId": "application-menu-item-delete",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "menu_item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-menu-item-delete"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с сообщением подтверждения."
      }
    },
    "/api/applications/{id}/menu_items/{menu_item_id}/up": {
      "post": {
        "summary": "Повышение приоритета пункта меню",
        "operationId": "application-menu-item-up",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "menu_item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-menu-item-up"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/applications/{id}/menu_items/{menu_item_id}/down": {
      "post": {
        "summary": "Понижение приоритета пункта меню",
        "operationId": "application-menu-item-down",
        "tags": [
          "ERP / Приложения"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "menu_item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Приложения/#application-menu-item-down"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/promotions": {
      "get": {
        "summary": "Получение списка промоакций",
        "operationId": "promotions-list",
        "tags": [
          "ERP / Промоакции"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "promotions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ промоакции"
                          },
                          "name": {
                            "type": "string",
                            "example": "Тестовая промоакция",
                            "description": "название промоакции"
                          },
                          "avatar": {
                            "type": "string",
                            "format": "uri",
                            "example": "https://api.gigma.ru/storage/uploads/default.svg",
                            "description": "URL изображения"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-07-27T18:13:40.000000Z",
                            "description": "дата и время добавления в систему"
                          }
                        }
                      }
                    },
                    "promotionsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Промоакции/#promotions-list"
        },
        "description": "#### Параметры запроса - `query` — поисковая строка"
      }
    },
    "/api/discounts": {
      "get": {
        "summary": "Получение списка скидок",
        "operationId": "discounts-list",
        "tags": [
          "ERP / Промоакции"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Промоакции/#discounts-list"
        },
        "description": "#### Параметры запроса - `query` — поисковая строка - `status` — фильтр по статусу - `application_id` — фильтр по приложению"
      },
      "post": {
        "summary": "Создание скидки",
        "operationId": "discount-create",
        "tags": [
          "ERP / Промоакции"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Промоакции/#discount-create"
        },
        "description": "#### Параметры запроса - `name` *(string, обязательно)* — название скидки - `application_id` *(int, обязательно)* — ID приложения - `discount_type` *(string)* — тип: `\"percent\"` | `\"fixed\"` - `discount_value` *(string)* — значение скидки, decimal-string - `code` *(string, опционально)* — промокод - `description` *(string, опционально)* — описание - `min_order_amount` *(string, опционально)* — минимальная сумма заказа для применения - `max_discount_amount` *(string, опционально)* — максимальная сумма скидки - `total_usage_limit` *(int, опционально)* — лимит использований всего - `per_client_usa",
        "x-used-in": [
          "17.5"
        ]
      }
    },
    "/api/discounts/{id}": {
      "get": {
        "summary": "Получение выбранной скидки",
        "operationId": "discount-get",
        "tags": [
          "ERP / Промоакции"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "discount": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "project_id": {
                          "type": "integer",
                          "example": 10
                        },
                        "application_id": {
                          "type": "integer",
                          "example": 1
                        },
                        "branch_id": {
                          "type": "integer",
                          "example": 5,
                          "description": "Бизнес/филиал. **НЕ** /api/businesses Получить актуальные значения: `GET /api/branches`"
                        },
                        "name": {
                          "type": "string",
                          "example": "Скидка 10% на первый заказ"
                        },
                        "code": {
                          "type": "string",
                          "example": "FIRST10"
                        },
                        "description": {
                          "type": "string",
                          "example": "Для новых покупателей"
                        },
                        "status": {
                          "type": "string",
                          "example": "active",
                          "description": "статус скидки (задан вручную): active | paused | archived"
                        },
                        "effective_status": {
                          "type": "string",
                          "example": "active",
                          "description": "реальный статус с учётом дат и лимитов (может отличаться от status)"
                        },
                        "discount_type": {
                          "type": "string",
                          "example": "percent",
                          "description": "тип скидки: percent (процент) | fixed (фиксированная сумма)"
                        },
                        "discount_value": {
                          "type": "string",
                          "format": "decimal",
                          "example": "10.00",
                          "description": "значение скидки, decimal-string"
                        },
                        "min_order_amount": {
                          "type": "string",
                          "format": "decimal",
                          "example": "500.00"
                        },
                        "max_discount_amount": {
                          "type": "string",
                          "format": "decimal",
                          "example": "1000.00"
                        },
                        "total_usage_limit": {
                          "type": "integer",
                          "example": 100
                        },
                        "total_used_count": {
                          "type": "integer",
                          "example": 5,
                          "description": "сколько раз скидка уже применялась"
                        },
                        "per_client_usage_limit": {
                          "type": "integer",
                          "example": 1
                        },
                        "usage_percent": {
                          "type": "integer",
                          "example": 5,
                          "description": "процент использования от total_usage_limit (0–100)"
                        },
                        "audience": {
                          "type": "string",
                          "example": "new",
                          "description": "кому доступна скидка: all | new | returning"
                        },
                        "starts_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-01-01T00:00:00.000000Z"
                        },
                        "ends_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-12-31T23:59:59.000000Z"
                        },
                        "url": {
                          "type": "string",
                          "nullable": true
                        },
                        "paused_at": {
                          "type": "string",
                          "nullable": true
                        },
                        "archived_at": {
                          "type": "string",
                          "nullable": true
                        },
                        "share_path": {
                          "type": "string",
                          "example": "/share/discount/FIRST10",
                          "description": "путь для шаринга промокода в E-Commerce приложении"
                        },
                        "magic_link": {
                          "type": "string",
                          "format": "uri",
                          "example": "https://api.gigma.ru/api/d/FIRST10",
                          "description": "прямая ссылка для активации скидки"
                        },
                        "created_by": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Артём"
                            }
                          }
                        },
                        "updated_by": {
                          "type": "string",
                          "nullable": true
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-01-01T00:00:00.000000Z"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2026-01-01T00:00:00.000000Z"
                        },
                        "latest_usages": {
                          "type": "array",
                          "items": {}
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Промоакции/#discount-get"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      },
      "put": {
        "summary": "Обновление скидки",
        "operationId": "discount-update",
        "tags": [
          "ERP / Промоакции"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Промоакции/#discount-update"
        },
        "description": "#### Параметры запроса Те же параметры, что и при создании."
      },
      "delete": {
        "summary": "Удаление скидки",
        "operationId": "discount-delete",
        "tags": [
          "ERP / Промоакции"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Промоакции/#discount-delete"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/discounts/stats": {
      "get": {
        "summary": "Статистика скидок",
        "operationId": "discounts-stats",
        "tags": [
          "ERP / Промоакции"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Промоакции/#discounts-stats"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` со сводной статистикой по скидкам (количество активных, на паузе, архивных, итоговая экономия покупателей и т.п.).",
        "x-used-in": [
          "17.5"
        ]
      }
    },
    "/api/discounts/{id}/pause": {
      "post": {
        "summary": "Поставить скидку на паузу",
        "operationId": "discount-pause",
        "tags": [
          "ERP / Промоакции"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Промоакции/#discount-pause"
        },
        "description": "Временно останавливает скидку. `effective_status` становится `\"paused\"`, поле `paused_at` заполняется."
      }
    },
    "/api/discounts/{id}/activate": {
      "post": {
        "summary": "Активировать скидку",
        "operationId": "discount-activate",
        "tags": [
          "ERP / Промоакции"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Промоакции/#discount-activate"
        },
        "description": "Снимает паузу и возобновляет скидку. `paused_at` сбрасывается в `null`."
      }
    },
    "/api/discounts/{id}/archive": {
      "post": {
        "summary": "Архивировать скидку",
        "operationId": "discount-archive",
        "tags": [
          "ERP / Промоакции"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Промоакции/#discount-archive"
        },
        "description": "Переводит скидку в архив. `archived_at` заполняется текущим временем."
      }
    },
    "/api/discounts/{id}/usages": {
      "get": {
        "summary": "Использования скидки",
        "operationId": "discount-usages",
        "tags": [
          "ERP / Промоакции"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Промоакции/#discount-usages"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с историей применений скидки (кто, когда, в каком заказе)."
      }
    },
    "/api/tables/reservations": {
      "get": {
        "summary": "Таблица резервов",
        "operationId": "reservations-table",
        "tags": [
          "ERP / Резервирование"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TablesEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "reservations": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "value": {
                                    "type": "integer",
                                    "example": 193
                                  },
                                  "url": {
                                    "type": "string",
                                    "example": "/inventories/list-inventories/57013"
                                  }
                                }
                              },
                              "code": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "nullable": true
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "1"
                                  },
                                  "url": {
                                    "type": "string",
                                    "example": "/inventories/list-inventories/57013"
                                  }
                                }
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-03-07T11:08:52.000000Z"
                              },
                              "name": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://api.gigma.ru/storage/uploads/FCusoYbrnJTaiN8C0bWmNt4HxZLru0ItXEBaH9UW.jpg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Line Repair Nutrient Bio Satin Serum Сыворотка «Био-Сатин», 30 мл"
                                  },
                                  "link": {
                                    "type": "string",
                                    "example": "/inventories/list-inventories/57013"
                                  }
                                }
                              },
                              "counterparty": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://api.gigma.ru/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Крушанов Александр"
                                  },
                                  "link": {
                                    "type": "string",
                                    "example": "/counterparty/list-counterparty/121"
                                  }
                                }
                              },
                              "warehouse": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://api.gigma.ru/storage/uploads/tsLs3JTSLCTFgSyDsdtxFsweHEbTTvn0HeqUepNr.webp"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Склад для приложения"
                                  },
                                  "link": {
                                    "type": "string",
                                    "example": "/warehouses/list-warehouses/50"
                                  }
                                }
                              },
                              "source": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://api.gigma.ru/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Сей момент"
                                  },
                                  "link": {
                                    "type": "string",
                                    "example": "/ecommerce/list-ecommerce/37"
                                  }
                                }
                              },
                              "quantity": {
                                "type": "integer",
                                "example": 1
                              },
                              "price": {
                                "type": "string",
                                "format": "decimal",
                                "example": "2100.00"
                              },
                              "expired_at": {
                                "type": "string",
                                "example": "2025-03-08 08:28:02"
                              },
                              "is_active": {
                                "type": "string",
                                "example": "Да"
                              },
                              "creator": {
                                "type": "string",
                                "example": "-"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "reservations"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Резервирование/#reservations-table"
        },
        "description": "#### Параметры запроса (query string) - `query` — поисковая строка - `order_id` — фильтр по ID заказа - `date_from` — «дата с…» (от даты бронирования) - `date_to` — «дата по…» - `page`, `per_page` — пагинация"
      }
    },
    "/api/reservations/{id}": {
      "delete": {
        "summary": "Удаление резерва ⚠ endpoint не существует на бэке",
        "operationId": "reservation-delete",
        "tags": [
          "ERP / Резервирование"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Резервирование/#reservation-delete"
        },
        "description": "⚠ **Этот endpoint описан исторически, но реально возвращает 404.** В `itecho-erp-backend` `ReservationController` имеет только метод `tableIndex` (`routes/api.php`: `Route::get('reservations', ...)`). Полного CRUD для резерваций НЕТ. **Как удалять резерв:** через позицию заказа — `DELETE /api/orders/{order}/nomenclatures/{nomenclatureId}` (это удаляет запись `Reservation`, на которой биндится `{nomenclatureId}` — см. erp-rules §18.7)."
      }
    },
    "/api/tables/warehouses": {
      "get": {
        "summary": "Получение списка складов",
        "operationId": "list-warehouses",
        "tags": [
          "ERP / Склады"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TablesEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "warehouses": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 3,
                                "description": "первичный ключ (номер склада)"
                              },
                              "name": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Коледино WB"
                                  }
                                },
                                "description": "название склада"
                              },
                              "owner": {
                                "type": "string",
                                "example": "Чужой",
                                "description": "принадлежность склада (свой/чужой)"
                              },
                              "city": {
                                "type": "string",
                                "example": "Москва",
                                "description": "город"
                              },
                              "creator": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "http://localhost:8000/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Полищук Артём"
                                  }
                                },
                                "description": "добавил в систему"
                              },
                              "storage_capacity": {
                                "type": "integer",
                                "example": 5000000,
                                "description": "объем склада"
                              },
                              "storage_unit": {
                                "type": "string",
                                "example": "Литр",
                                "description": "единицы измерения"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "warehouses"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Склады/#list-warehouses"
        },
        "description": "#### Параметры запроса - `owned_by_us` — иерархия (принадлежность) склада: свой (true), чужой (false) - `type_id[]` — массив ID типов хранимых товаров - `city_id[]` — массив ID городов - `page` — текущая страница (для пагинации) - `per_page` — кол-во элементов на странице - `query` — поисковая строка - `date_from` — \"дата с...\" (от даты добавления в систему) - `date_to` — \"дата по...\" (от даты добавления в систему)"
      }
    },
    "/api/warehouses/{id}": {
      "get": {
        "summary": "Получение выбранного склада",
        "operationId": "get-warehouse",
        "tags": [
          "ERP / Склады"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "warehouse": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ (номер склада)"
                        },
                        "name": {
                          "type": "string",
                          "example": "Подольск"
                        },
                        "avatar": {
                          "type": "string",
                          "nullable": true
                        },
                        "code": {
                          "type": "integer",
                          "example": 1,
                          "description": "уникальный код склада"
                        },
                        "owned_by_us": {
                          "type": "boolean",
                          "example": false,
                          "description": "принадлежность склада (свой/чужой)"
                        },
                        "address": {
                          "type": "string",
                          "example": "Троицкая улица, 20, деревня Коледино, городской округ Подольск, Московская область",
                          "description": "адрес склада"
                        },
                        "storage_capacity": {
                          "type": "integer",
                          "example": 5000000,
                          "description": "объем склада"
                        },
                        "storage_unit": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ (номер склада)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Литр"
                            },
                            "abbreviation": {
                              "type": "string",
                              "example": "л"
                            }
                          },
                          "description": "объект с информацией о единицах измерения"
                        },
                        "city": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ (номер склада)"
                            },
                            "name": {
                              "type": "string",
                              "example": "Москва"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg",
                              "description": "объект с информацией об аватаре/фотографии склада (или null)"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-19T09:18:41.000000Z"
                            }
                          },
                          "description": "объект с информацией о городе"
                        },
                        "counterparty": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 54,
                              "description": "первичный ключ (номер склада)"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 2,
                                  "description": "первичный ключ (номер склада)"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Поставщик"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "http://localhost:8000/storage/uploads/default.svg",
                                  "description": "объект с информацией об аватаре/фотографии склада (или null)"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "manager": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "первичный ключ (номер склада)"
                                },
                                "first_name": {
                                  "type": "string",
                                  "example": "Артём"
                                },
                                "last_name": {
                                  "type": "string",
                                  "example": "Полищук"
                                },
                                "middle_name": {
                                  "type": "string",
                                  "example": "Николаевич"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Полищук Артём"
                                }
                              }
                            },
                            "avatar": {
                              "type": "string",
                              "nullable": true
                            },
                            "name": {
                              "type": "string",
                              "example": "ООО \"НЕТФЛИКС\""
                            },
                            "registered_at": {
                              "type": "string",
                              "format": "date",
                              "example": "2008-10-20"
                            },
                            "inn": {
                              "type": "string",
                              "example": "7743277284"
                            },
                            "kpp": {
                              "type": "string",
                              "nullable": true
                            },
                            "head": {
                              "type": "string",
                              "example": "Чуйков Андрей Николаевич"
                            },
                            "legal_address": {
                              "type": "string",
                              "example": "г Москва, ул Адмирала Макарова, д 8 стр 1, помещ V ком 15, 15"
                            },
                            "phone_1": {
                              "type": "string",
                              "example": "71231412412"
                            },
                            "phone_2": {
                              "type": "string",
                              "example": "74416763277"
                            },
                            "email": {
                              "type": "string",
                              "example": "asdaslow@gmail.com"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-06-11T15:00:33.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-06-11T19:33:38.000000Z"
                            }
                          },
                          "description": "объект с информацией о контрагенте"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Склады/#get-warehouse"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      },
      "put": {
        "summary": "Редактирование склада",
        "operationId": "update-warehouse",
        "tags": [
          "ERP / Склады"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "warehouse": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 5
                        },
                        "name": {
                          "type": "string",
                          "example": "Коледино WB",
                          "description": "название склада"
                        },
                        "avatar": {
                          "type": "string",
                          "nullable": true
                        },
                        "code": {
                          "type": "integer",
                          "example": 1,
                          "description": "уникальный код склада"
                        },
                        "owned_by_us": {
                          "type": "boolean",
                          "example": false,
                          "description": "принадлежность склада (свой/чужой)"
                        },
                        "address": {
                          "type": "string",
                          "example": "Троицкая улица, 20, деревня Коледино, городской округ Подольск, Московская область",
                          "description": "адрес склада"
                        },
                        "storage_capacity": {
                          "type": "integer",
                          "example": 5000000,
                          "description": "объем склада (целочисленное значение)"
                        },
                        "storage_unit": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Литр",
                              "description": "название склада"
                            },
                            "abbreviation": {
                              "type": "string",
                              "example": "л"
                            }
                          }
                        },
                        "city": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Москва",
                              "description": "название склада"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-19T09:18:41.000000Z"
                            }
                          }
                        },
                        "counterparty": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 54
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Поставщик",
                                  "description": "название склада"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "http://localhost:8000/storage/uploads/default.svg"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "manager": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "first_name": {
                                  "type": "string",
                                  "example": "Артём"
                                },
                                "last_name": {
                                  "type": "string",
                                  "example": "Полищук"
                                },
                                "middle_name": {
                                  "type": "string",
                                  "example": "Николаевич"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Полищук Артём",
                                  "description": "название склада"
                                }
                              }
                            },
                            "avatar": {
                              "type": "string",
                              "nullable": true
                            },
                            "name": {
                              "type": "string",
                              "example": "ООО \"НЕТФЛИКС\"",
                              "description": "название склада"
                            },
                            "registered_at": {
                              "type": "string",
                              "format": "date",
                              "example": "2008-10-20"
                            },
                            "inn": {
                              "type": "string",
                              "example": "7743277284"
                            },
                            "kpp": {
                              "type": "string",
                              "nullable": true
                            },
                            "head": {
                              "type": "string",
                              "example": "Чуйков Андрей Николаевич"
                            },
                            "legal_address": {
                              "type": "string",
                              "example": "г Москва, ул Адмирала Макарова, д 8 стр 1, помещ V ком 15, 15"
                            },
                            "phone_1": {
                              "type": "string",
                              "example": "71231412412"
                            },
                            "phone_2": {
                              "type": "string",
                              "example": "74416763277"
                            },
                            "email": {
                              "type": "string",
                              "example": "asdaslow@gmail.com"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-06-11T15:00:33.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-06-11T19:33:38.000000Z"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Склады/#update-warehouse"
        },
        "description": "#### Параметры запроса - `photo_id` — ID файла аватара/фотографии склада (в ответе возвращается как поле `avatar`) - `name` — название склада - `code` — уникальный код склада - `owned_by_us` — принадлежность склада (свой/чужой) - `address` — адрес склада - `city_id` — ID города - `storage_capacity` — объем склада (целочисленное значение) - `storage_unit_id` — ID единиц измерения - `counterparty_id` — ID поставщика (использовать с ID типа = 2 \"Поставщик\")",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "photo_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID файла аватара/фотографии склада (в ответе возвращается как поле avatar)"
                  },
                  "code": {
                    "type": "integer",
                    "example": 1,
                    "description": "уникальный код склада"
                  },
                  "name": {
                    "type": "string",
                    "example": "Коледино WB",
                    "description": "название склада"
                  },
                  "owned_by_us": {
                    "type": "boolean",
                    "example": false,
                    "description": "принадлежность склада (свой/чужой)"
                  },
                  "address": {
                    "type": "string",
                    "example": "Троицкая улица, 20, деревня Коледино, городской округ Подольск, Московская область",
                    "description": "адрес склада"
                  },
                  "storage_capacity": {
                    "type": "integer",
                    "example": 5000000,
                    "description": "объем склада (целочисленное значение)"
                  },
                  "storage_unit_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Единица измерения. **НЕ** /api/units. Запись имеет только {id, name, abbreviation} — без avatar/created_at. Получить актуальные значения: `GET /api/storage_units`"
                  },
                  "city_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Город Получить актуальные значения: `GET /api/cities`"
                  },
                  "counterparty_id": {
                    "type": "integer",
                    "example": 54,
                    "description": "ID поставщика (использовать с ID типа = 2 Поставщик)"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление склада",
        "operationId": "delete-warehouse",
        "tags": [
          "ERP / Склады"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Склады/#delete-warehouse"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/warehouses": {
      "post": {
        "summary": "Добавление склада",
        "operationId": "create-warehouse",
        "tags": [
          "ERP / Склады"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "warehouse": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 5
                        },
                        "name": {
                          "type": "string",
                          "example": "Подольск",
                          "description": "название склада"
                        },
                        "avatar": {
                          "type": "string",
                          "nullable": true
                        },
                        "code": {
                          "type": "integer",
                          "example": 1,
                          "description": "уникальный код склада"
                        },
                        "owned_by_us": {
                          "type": "boolean",
                          "example": false,
                          "description": "принадлежность склада (свой/чужой)"
                        },
                        "address": {
                          "type": "string",
                          "example": "Троицкая улица, 20, деревня Коледино, городской округ Подольск, Московская область",
                          "description": "адрес склада"
                        },
                        "storage_capacity": {
                          "type": "integer",
                          "example": 5000000,
                          "description": "объем склада (целочисленное значение)"
                        },
                        "storage_unit": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Литр",
                              "description": "название склада"
                            },
                            "abbreviation": {
                              "type": "string",
                              "example": "л"
                            }
                          }
                        },
                        "city": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Москва",
                              "description": "название склада"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "http://localhost:8000/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-19T09:18:41.000000Z"
                            }
                          }
                        },
                        "counterparty": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 54
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 2
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Поставщик",
                                  "description": "название склада"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "http://localhost:8000/storage/uploads/default.svg"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "manager": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "first_name": {
                                  "type": "string",
                                  "example": "Артём"
                                },
                                "last_name": {
                                  "type": "string",
                                  "example": "Полищук"
                                },
                                "middle_name": {
                                  "type": "string",
                                  "example": "Николаевич"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Полищук Артём",
                                  "description": "название склада"
                                }
                              }
                            },
                            "avatar": {
                              "type": "string",
                              "nullable": true
                            },
                            "name": {
                              "type": "string",
                              "example": "ООО \"НЕТФЛИКС\"",
                              "description": "название склада"
                            },
                            "registered_at": {
                              "type": "string",
                              "format": "date",
                              "example": "2008-10-20"
                            },
                            "inn": {
                              "type": "string",
                              "example": "7743277284"
                            },
                            "kpp": {
                              "type": "string",
                              "nullable": true
                            },
                            "head": {
                              "type": "string",
                              "example": "Чуйков Андрей Николаевич"
                            },
                            "legal_address": {
                              "type": "string",
                              "example": "г Москва, ул Адмирала Макарова, д 8 стр 1, помещ V ком 15, 15"
                            },
                            "phone_1": {
                              "type": "string",
                              "example": "71231412412"
                            },
                            "phone_2": {
                              "type": "string",
                              "example": "74416763277"
                            },
                            "email": {
                              "type": "string",
                              "example": "asdaslow@gmail.com"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-06-11T15:00:33.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-06-11T19:33:38.000000Z"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Склады/#create-warehouse"
        },
        "description": "#### Параметры запроса - `photo_id` — ID файла аватара/фотографии склада (в ответе возвращается как поле `avatar`) - `name` — название склада - `code` — уникальный код склада - `owned_by_us` — принадлежность склада (свой/чужой) - `address` — адрес склада - `city_id` — ID города - `storage_capacity` — объем склада (целочисленное значение) - `storage_unit_id` — ID единиц измерения - `counterparty_id` — ID поставщика",
        "x-used-in": [
          "17.3"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "photo_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID файла аватара/фотографии склада (в ответе возвращается как поле avatar)"
                  },
                  "code": {
                    "type": "integer",
                    "example": 1,
                    "description": "уникальный код склада"
                  },
                  "name": {
                    "type": "string",
                    "example": "Коледино WB",
                    "description": "название склада"
                  },
                  "owned_by_us": {
                    "type": "boolean",
                    "example": false,
                    "description": "принадлежность склада (свой/чужой)"
                  },
                  "address": {
                    "type": "string",
                    "example": "Троицкая улица, 20, деревня Коледино, городской округ Подольск, Московская область",
                    "description": "адрес склада"
                  },
                  "storage_capacity": {
                    "type": "integer",
                    "example": 5000000,
                    "description": "объем склада (целочисленное значение)"
                  },
                  "storage_unit_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Единица измерения. **НЕ** /api/units. Запись имеет только {id, name, abbreviation} — без avatar/created_at. Получить актуальные значения: `GET /api/storage_units`"
                  },
                  "city_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Город Получить актуальные значения: `GET /api/cities`"
                  },
                  "counterparty_id": {
                    "type": "integer",
                    "example": 54,
                    "description": "ID поставщика"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/warehouses/{id}/integrations": {
      "get": {
        "summary": "Получение списка интеграций",
        "operationId": "list-integrations",
        "tags": [
          "ERP / Склады"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integrations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "integration_id": {
                            "type": "integer",
                            "example": 10,
                            "description": "ID интеграции"
                          },
                          "name": {
                            "type": "string",
                            "example": "Wildberries",
                            "description": "название интеграции"
                          },
                          "avatar": {
                            "type": "string",
                            "format": "uri",
                            "example": "http://localhost:8000/storage/uploads/default.svg",
                            "description": "URL-адрес фотографии"
                          },
                          "is_active": {
                            "type": "integer",
                            "example": 0,
                            "description": "статус (false — неактивна; true — активна)"
                          }
                        }
                      }
                    },
                    "integrationsCount": {
                      "type": "integer",
                      "example": 4
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Склады/#list-integrations"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/warehouses/{id}/integrations/{id}": {
      "put": {
        "summary": "Обновление статуса выбранной интеграции",
        "operationId": "update-integration-status",
        "tags": [
          "ERP / Склады"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "integration": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "integration_id": {
                          "type": "integer",
                          "example": 10
                        },
                        "name": {
                          "type": "string",
                          "example": "Wildberries"
                        },
                        "avatar": {
                          "type": "string",
                          "format": "uri",
                          "example": "http://localhost:8000/storage/uploads/default.svg"
                        },
                        "is_active": {
                          "type": "integer",
                          "example": 1,
                          "description": "булевый флаг, означающий текущий статус интеграции"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Склады/#update-integration-status"
        },
        "description": "#### Параметры запроса - `is_active` — булевый флаг, означающий текущий статус интеграции",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "is_active": {
                    "type": "integer",
                    "example": 1,
                    "description": "булевый флаг, означающий текущий статус интеграции"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/warehouses/{id}/integrations/{id}/parameters": {
      "get": {
        "summary": "Получение списка параметров интеграции",
        "operationId": "list-integration-parameters",
        "tags": [
          "ERP / Склады"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "parameters": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 2,
                            "description": "первичный ключ"
                          },
                          "key_1": {
                            "type": "string",
                            "example": "login",
                            "description": "ключ 1"
                          },
                          "description_1": {
                            "type": "string",
                            "example": "Логин/ID",
                            "description": "описание 1"
                          },
                          "key_2": {
                            "type": "string",
                            "example": "password",
                            "description": "ключ 2"
                          },
                          "description_2": {
                            "type": "string",
                            "example": "Пароль",
                            "description": "описание 2"
                          },
                          "value_1": {
                            "type": "string",
                            "example": "dsfsdfdsf",
                            "description": "значение 1"
                          },
                          "value_2": {
                            "type": "string",
                            "example": "sdfdsfsd",
                            "description": "значение 2"
                          }
                        }
                      }
                    },
                    "parametersCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Склады/#list-integration-parameters"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      },
      "post": {
        "summary": "Добавление параметров для выбранной интеграции",
        "operationId": "add-integration-parameters",
        "tags": [
          "ERP / Склады"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "parameter": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 2
                        },
                        "key_1": {
                          "type": "string",
                          "example": "login"
                        },
                        "description_1": {
                          "type": "string",
                          "example": "Логин/ID"
                        },
                        "key_2": {
                          "type": "string",
                          "example": "password"
                        },
                        "description_2": {
                          "type": "string",
                          "example": "Пароль"
                        },
                        "value_1": {
                          "type": "string",
                          "example": "dsfsdfdsf",
                          "description": "значение 1"
                        },
                        "value_2": {
                          "type": "string",
                          "example": "sdfdsfsd",
                          "description": "значение 2"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Склады/#add-integration-parameters"
        },
        "description": "#### Параметры запроса - `integration_parameter_id` — ID параметра интеграции - `value_1` — значение 1 - `value_2` — значение 2",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "integration_parameter_id": {
                    "type": "integer",
                    "example": 10,
                    "description": "ID параметра интеграции"
                  },
                  "value_1": {
                    "type": "string",
                    "example": "83432434234",
                    "description": "значение 1"
                  },
                  "value_2": {
                    "type": "string",
                    "example": "sdfdsxcvxcvfsd",
                    "description": "значение 2"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/warehouses/{id}/integrations/{id}/parameters/{id}": {
      "post": {
        "summary": "Удаление параметров из выбранной интеграции",
        "operationId": "delete-integration-parameters",
        "tags": [
          "ERP / Склады"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Parameter successfully deleted.",
                      "description": "информационное сообщение"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Склады/#delete-integration-parameters"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/warehouses/{id}/history": {
      "get": {
        "summary": "Получение истории изменений",
        "operationId": "warehouse-history",
        "tags": [
          "ERP / Склады"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/LaravelPaginator"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 283,
                                "description": "первичный ключ"
                              },
                              "icon": {
                                "type": "string",
                                "example": "check",
                                "description": "иконка"
                              },
                              "color": {
                                "type": "string",
                                "example": "primary",
                                "description": "цвет"
                              },
                              "title": {
                                "type": "string",
                                "example": "Создание",
                                "description": "заголовок"
                              },
                              "description": {
                                "type": "string",
                                "example": "Создание: Полищук Артём",
                                "description": "описание"
                              },
                              "datetime": {
                                "type": "string",
                                "example": "15.07.2024 05:46",
                                "description": "дата выполнения действия"
                              }
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Склады/#warehouse-history"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/screens": {
      "get": {
        "summary": "Получение списка экранов, к которым применяется проверка права на доступ",
        "operationId": "list-screens",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "screens": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Контрагенты",
                            "description": "название экрана"
                          },
                          "permissions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 9,
                                  "description": "первичный ключ"
                                },
                                "screen": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "integer",
                                      "example": 1,
                                      "description": "первичный ключ"
                                    },
                                    "name": {
                                      "type": "string",
                                      "example": "Контрагенты",
                                      "description": "название экрана"
                                    },
                                    "created_at": {
                                      "type": "string",
                                      "format": "date-time",
                                      "example": "2024-03-27T07:00:46.000000Z"
                                    }
                                  }
                                },
                                "name": {
                                  "type": "string",
                                  "example": "view-counterparties",
                                  "description": "название экрана"
                                },
                                "description": {
                                  "type": "string",
                                  "example": "Просмотр контрагентов"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "screensCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-screens"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/screens/{id}": {
      "get": {
        "summary": "Получение выбранного экрана со списком прав доступа",
        "operationId": "get-screen",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "screen": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Контрагенты",
                          "description": "название экрана"
                        },
                        "permissions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 9,
                                "description": "первичный ключ"
                              },
                              "screen": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 1,
                                    "description": "первичный ключ"
                                  },
                                  "name": {
                                    "type": "string",
                                    "example": "Контрагенты",
                                    "description": "название экрана"
                                  },
                                  "created_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "example": "2024-03-27T07:00:46.000000Z"
                                  }
                                }
                              },
                              "name": {
                                "type": "string",
                                "example": "view-counterparties",
                                "description": "название экрана"
                              },
                              "description": {
                                "type": "string",
                                "example": "Просмотр контрагентов"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-03-27T07:00:46.000000Z"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-screen"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/counterparty_types": {
      "get": {
        "summary": "Получение списка с типами контрагентов",
        "operationId": "list-counterparty-types",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterpartyTypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Клиент",
                            "description": "тип контрагента"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-03-27T07:00:46.000000Z",
                            "description": "дата и время добавления в систему"
                          }
                        }
                      }
                    },
                    "counterpartyTypesCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-counterparty-types"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/counterparty_types/{id}": {
      "get": {
        "summary": "Получение выбранного типа контрагента",
        "operationId": "get-counterparty-type",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "counterpartyType": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Клиент",
                          "description": "тип контрагента"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-03-27T07:00:46.000000Z",
                          "description": "дата и время добавления в систему"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-counterparty-type"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/departments": {
      "get": {
        "summary": "Получение списка отделов",
        "operationId": "list-departments",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "departments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Технический",
                            "description": "название отдела"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2023-11-13T13:20:36.000000Z",
                            "description": "дата и время добавления в систему"
                          }
                        }
                      }
                    },
                    "departmentsCount": {
                      "type": "integer",
                      "example": 5
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-departments"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      },
      "post": {
        "summary": "Добавление отдела",
        "operationId": "create-department",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "department": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 6,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "IT",
                          "description": "название отдела"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2023-11-13T13:22:07.000000Z",
                          "description": "дата и время добавления в систему"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#create-department"
        },
        "description": "#### Параметры запроса - `name` — название отдела",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "IT",
                    "description": "название отдела"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/departments/{id}": {
      "get": {
        "summary": "Получение выбранного отдела",
        "operationId": "get-department",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "department": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Технический",
                          "description": "название отдела"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2023-11-13T13:20:36.000000Z",
                          "description": "дата и время добавления в систему"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-department"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      },
      "put": {
        "summary": "Редактирование отдела",
        "operationId": "update-department",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "department": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 6,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "IT",
                          "description": "название отдела"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2023-11-13T13:22:07.000000Z",
                          "description": "дата и время добавления в систему"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#update-department"
        },
        "description": "#### Параметры запроса - `name` — название отдела",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "IT",
                    "description": "название отдела"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление выбранного отдела",
        "operationId": "delete-department",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#delete-department"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/roles": {
      "get": {
        "summary": "Получение списка ролей пользователей",
        "operationId": "list-roles",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "roles": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "owner",
                            "description": "значение роли"
                          },
                          "description": {
                            "type": "string",
                            "example": "Собственник",
                            "description": "описание роли (на русском языке)"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-03-27T07:00:46.000000Z",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "rolesCount": {
                      "type": "integer",
                      "example": 4
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-roles"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      },
      "post": {
        "summary": "Добавление роли пользователя",
        "operationId": "create-role",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 4,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "accountant",
                          "description": "значение роли"
                        },
                        "description": {
                          "type": "string",
                          "example": "Бухгалтер",
                          "description": "описание роли (на русском языке)"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2023-11-13T13:24:23.000000Z",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#create-role"
        },
        "description": "#### Параметры запроса - `name` — код роли - `description` — описание роли (на русском языке)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "accountant",
                    "description": "значение роли"
                  },
                  "description": {
                    "type": "string",
                    "example": "Бухгалтер",
                    "description": "описание роли (на русском языке)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/roles/{id}": {
      "get": {
        "summary": "Получение выбранной роли пользователя",
        "operationId": "get-role",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "owner",
                          "description": "значение роли"
                        },
                        "description": {
                          "type": "string",
                          "example": "Собственник",
                          "description": "описание роли (на русском языке)"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-03-27T07:00:46.000000Z",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-role"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      },
      "put": {
        "summary": "Редактирование роли пользователя",
        "operationId": "update-role",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 4,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "accountant",
                          "description": "значение роли"
                        },
                        "description": {
                          "type": "string",
                          "example": "Бухгалтер",
                          "description": "описание роли (на русском языке)"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2023-11-13T13:24:23.000000Z",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#update-role"
        },
        "description": "#### Параметры запроса - `name` — код роли - `description` — описание роли (на русском языке)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "accountant",
                    "description": "значение роли"
                  },
                  "description": {
                    "type": "string",
                    "example": "Бухгалтер",
                    "description": "описание роли (на русском языке)"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление выбранной роли пользователя",
        "operationId": "delete-role",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#delete-role"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/file_types": {
      "get": {
        "summary": "Список типов файлов",
        "operationId": "file-types-list",
        "tags": [
          "ERP / Файлы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fileTypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Трудовой договор"
                          },
                          "avatar": {
                            "type": "string",
                            "format": "uri",
                            "example": "https://api.gigma.ru/storage/uploads/default.svg"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-03-27T07:00:46.000000Z"
                          }
                        }
                      }
                    },
                    "fileTypesCount": {
                      "type": "integer",
                      "example": 2,
                      "description": "общее количество"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Файлы/#file-types-list"
        },
        "description": "Используется при загрузке файла, чтобы выбрать `file_type_id`."
      }
    },
    "/api/file_types/{id}": {
      "get": {
        "summary": "Тип файла по ID",
        "operationId": "file-type-get",
        "tags": [
          "ERP / Файлы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fileType": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "name": {
                          "type": "string",
                          "example": "Трудовой договор"
                        },
                        "avatar": {
                          "type": "string",
                          "format": "uri",
                          "example": "https://api.gigma.ru/storage/uploads/default.svg"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-03-27T07:00:46.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Файлы/#file-type-get"
        },
        "description": "#### Ответ"
      }
    },
    "/api/permissions": {
      "get": {
        "summary": "Получение списка прав доступа",
        "operationId": "list-permissions",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "permissions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "screen": {
                            "type": "string",
                            "nullable": true
                          },
                          "name": {
                            "type": "string",
                            "example": "view-admins",
                            "description": "значение права доступа"
                          },
                          "description": {
                            "type": "string",
                            "example": "Просмотр администраторов",
                            "description": "описание права доступа (на русском языке)"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2023-11-16T09:07:19.000000Z",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "permissionsCount": {
                      "type": "integer",
                      "example": 16
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-permissions"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      },
      "post": {
        "summary": "Добавление права доступа",
        "operationId": "create-permission",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "permission": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 13,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "edit-admins",
                          "description": "значение права доступа"
                        },
                        "description": {
                          "type": "string",
                          "example": "Редактирование списка администраторов",
                          "description": "описание роли (на русском языке)"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2023-11-13T13:31:38.000000Z",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#create-permission"
        },
        "description": "#### Параметры запроса - `name` — значение права доступа - `description` — описание роли (на русском языке)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "edit-admins",
                    "description": "значение права доступа"
                  },
                  "description": {
                    "type": "string",
                    "example": "Редактирование списка администраторов",
                    "description": "описание роли (на русском языке)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/permissions/{id}": {
      "get": {
        "summary": "Получение выбранного права доступа",
        "operationId": "get-permission",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "permission": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "edit-roles",
                          "description": "значение права доступа"
                        },
                        "description": {
                          "type": "string",
                          "example": "Редактирование ролей",
                          "description": "описание права доступа (на русском языке)"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2023-11-13T13:20:36.000000Z",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-permission"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      },
      "put": {
        "summary": "Редактирование права доступа",
        "operationId": "update-permission",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "permission": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 13,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "edit-admins",
                          "description": "значение права доступа"
                        },
                        "description": {
                          "type": "string",
                          "example": "Редактирование списка администраторов",
                          "description": "описание роли (на русском языке)"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2023-11-13T13:31:38.000000Z",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#update-permission"
        },
        "description": "#### Параметры запроса - `name` — значение права доступа - `description` — описание роли (на русском языке)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "edit-admins",
                    "description": "значение права доступа"
                  },
                  "description": {
                    "type": "string",
                    "example": "Редактирование списка администраторов",
                    "description": "описание роли (на русском языке)"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление выбранного права доступа",
        "operationId": "delete-permission",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#delete-permission"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/call_statuses": {
      "get": {
        "summary": "Получение списка статусов звонков",
        "operationId": "list-call-statuses",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "callStatuses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Создан",
                            "description": "статус звонка"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2023-12-27T22:53:33.000000Z",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "callStatusesCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-call-statuses"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/call_statuses/{id}": {
      "get": {
        "summary": "Получение выбранного статуса звонка",
        "operationId": "get-call-status",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "callStatus": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Создан",
                          "description": "статус звонка"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2023-12-27T22:53:33.000000Z",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-call-status"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/order_statuses": {
      "get": {
        "summary": "Получение списка статусов заказов",
        "operationId": "list-order-statuses",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orderStatuses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Новый",
                            "description": "статус заказа"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-01-08T05:21:59.000000Z",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "orderStatusesCount": {
                      "type": "integer",
                      "example": 8
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-order-statuses"
        },
        "description": "#### Параметры запроса Параметры не передаются.",
        "x-used-in": [
          "17.4"
        ]
      }
    },
    "/api/order_statuses/{id}": {
      "get": {
        "summary": "Получение выбранного статуса заказа",
        "operationId": "get-order-status",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orderStatus": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Новый",
                          "description": "статус заказа"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-01-08T05:21:59.000000Z",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-order-status"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/task_statuses": {
      "get": {
        "summary": "Получение списка статусов задач",
        "operationId": "list-task-statuses",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "taskStatuses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "В работе",
                            "description": "статус задачи"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-01-22T21:52:32.000000Z",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "taskStatusesCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-task-statuses"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/task_statuses/{id}": {
      "get": {
        "summary": "Получение выбранного статуса задачи",
        "operationId": "get-task-status",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "taskStatus": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "В работе",
                          "description": "статус задачи"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-01-22T21:52:32.000000Z",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-task-status"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/countries": {
      "get": {
        "summary": "Получение списка стран",
        "operationId": "list-countries",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "countries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Россия",
                            "description": "страна"
                          },
                          "avatar": {
                            "type": "string",
                            "format": "uri",
                            "example": "http://localhost:8000/storage/uploads/default.svg",
                            "description": "URL-адрес фотографии"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-04-10T06:59:28.000000Z",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "countriesCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-countries"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/storage_units": {
      "get": {
        "summary": "Получение списка единиц измерения",
        "operationId": "list-storage-units",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "units": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Литр",
                            "description": "полное название"
                          },
                          "abbreviation": {
                            "type": "string",
                            "example": "л",
                            "description": "аббревиатура"
                          }
                        }
                      }
                    },
                    "unitsCount": {
                      "type": "integer",
                      "example": 10
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-storage-units"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/storage_units/{id}": {
      "get": {
        "summary": "Получение выбранной единицы измерения",
        "operationId": "get-storage-unit",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unit": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Литр",
                          "description": "полное название"
                        },
                        "abbreviation": {
                          "type": "string",
                          "example": "л",
                          "description": "аббревиатура"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-storage-unit"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/brands": {
      "get": {
        "summary": "Получение списка брендов",
        "operationId": "list-brands",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "brands": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 45,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "COCODOR",
                            "description": "производитель"
                          },
                          "avatar": {
                            "type": "string",
                            "format": "uri",
                            "example": "http://localhost:8000/storage/uploads/8M3PQIpdd3n4cQqM7cXUBILlMMTpZPyv8DdRYmAV.webp",
                            "description": "URL фотографии производителя"
                          },
                          "branch": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 37,
                                "description": "первичный ключ"
                              },
                              "title": {
                                "type": "string",
                                "example": "Торговля косметикой"
                              }
                            },
                            "description": "объект с информацией о направлении бизнеса"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-12-11T12:28:57.000000Z",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "brandsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-brands"
        },
        "description": "#### Параметры запроса - `query` — поисковая строка",
        "x-used-in": [
          "17.7"
        ]
      },
      "post": {
        "summary": "Добавление бренда",
        "operationId": "create-brand",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "brand": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 44,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "TEST",
                          "description": "производитель"
                        },
                        "avatar": {
                          "type": "string",
                          "format": "uri",
                          "example": "http://localhost:8000/storage/uploads/default.svg",
                          "description": "URL фотографии производителя"
                        },
                        "branch": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 15,
                              "description": "первичный ключ"
                            },
                            "title": {
                              "type": "string",
                              "example": "Торговля косметикой"
                            }
                          },
                          "description": "объект с информацией о направлении бизнеса"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-12-10T15:45:05.000000Z",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#create-brand"
        },
        "description": "#### Параметры запроса - `name` [обязательно] — название торговой марки - `avatar_id` — ID фотографии торговой марки - `branch_id` — ID бизнеса",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "TEST",
                    "description": "производитель"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID фотографии торговой марки"
                  },
                  "branch_id": {
                    "type": "integer",
                    "example": 15,
                    "description": "Бизнес/филиал. **НЕ** /api/businesses Получить актуальные значения: `GET /api/branches`"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/brands/{id}": {
      "get": {
        "summary": "Получение выбранного бренда",
        "operationId": "get-brand",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "brand": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 45,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "COCODOR",
                          "description": "производитель"
                        },
                        "avatar": {
                          "type": "string",
                          "format": "uri",
                          "example": "http://localhost:8000/storage/uploads/8M3PQIpdd3n4cQqM7cXUBILlMMTpZPyv8DdRYmAV.webp",
                          "description": "URL фотографии производителя"
                        },
                        "branch": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 37,
                              "description": "первичный ключ"
                            },
                            "title": {
                              "type": "string",
                              "example": "Торговля косметикой"
                            }
                          },
                          "description": "объект с информацией о направлении бизнеса"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-12-11T12:28:57.000000Z",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-brand"
        },
        "description": "#### Параметры запроса Передаваемые параметры отсутствуют."
      },
      "put": {
        "summary": "Обновление бренда",
        "operationId": "update-brand",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "brand": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 44,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "TEST",
                          "description": "производитель"
                        },
                        "avatar": {
                          "type": "string",
                          "format": "uri",
                          "example": "http://localhost:8000/storage/uploads/default.svg",
                          "description": "URL фотографии производителя"
                        },
                        "branch": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 14,
                              "description": "первичный ключ"
                            },
                            "title": {
                              "type": "string",
                              "example": "Торговля одеждой"
                            }
                          },
                          "description": "объект с информацией о направлении бизнеса"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-12-10T15:45:05.000000Z",
                          "description": "дата и время добавления"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#update-brand"
        },
        "description": "#### Параметры запроса - `name` [обязательно] — название торговой марки - `avatar_id` — ID фотографии торговой марки - `branch_id` — ID бизнеса",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "example": "TEST",
                    "description": "производитель"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID фотографии торговой марки"
                  },
                  "branch_id": {
                    "type": "integer",
                    "example": 14,
                    "description": "Бизнес/филиал. **НЕ** /api/businesses Получить актуальные значения: `GET /api/branches`"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/objects": {
      "get": {
        "summary": "Получение списка объектов",
        "operationId": "list-objects",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "objects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Wildberries",
                            "description": "название объекта"
                          },
                          "avatar": {
                            "type": "string",
                            "format": "uri",
                            "example": "http://localhost:8000/storage/uploads/ypPdC9qVA2MZLbQ0l9nfS5LRlcMAVPiTBZhV31UY.svg",
                            "description": "URL на фотографию"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-07-27T18:15:28.000000Z",
                            "description": "дата/время добавления в систему"
                          }
                        }
                      }
                    },
                    "objectsCount": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-objects"
        },
        "description": "#### Параметры запроса - `query` — поисковая строка"
      }
    },
    "/api/sales_channels": {
      "get": {
        "summary": "Получение списка каналов продаж",
        "operationId": "list-sales-channels",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "salesChannels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Авито",
                            "description": "название канала продаж"
                          },
                          "avatar": {
                            "type": "string",
                            "format": "uri",
                            "example": "https://api.gigma.ru/storage/uploads/default.svg",
                            "description": "URL фотографии"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-03-27T07:00:46.000000Z",
                            "description": "дата и время добавления"
                          }
                        }
                      }
                    },
                    "salesChannelsCount": {
                      "type": "integer",
                      "example": 4
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-sales-channels"
        },
        "description": "#### Параметры запроса - `query` — поисковая строка"
      }
    },
    "/api/vats": {
      "get": {
        "summary": "Получение списка НДС",
        "operationId": "list-vat",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vats": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Без НДС",
                            "description": "название значения НДС"
                          },
                          "value": {
                            "type": "string",
                            "format": "decimal",
                            "example": "0.00",
                            "description": "значение НДС в процентах"
                          }
                        }
                      }
                    },
                    "vatsCount": {
                      "type": "integer",
                      "example": 4
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-vat"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/vats/{id}": {
      "get": {
        "summary": "Получение выбранного значения НДС",
        "operationId": "get-vat",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "vat": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Без НДС",
                          "description": "название значения НДС"
                        },
                        "value": {
                          "type": "string",
                          "format": "decimal",
                          "example": "0.00",
                          "description": "значение НДС в процентах"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-vat"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/page_types": {
      "get": {
        "summary": "Получение списка типов страниц",
        "operationId": "list-page-types",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pageTypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Главная",
                            "description": "тип страницы"
                          }
                        }
                      }
                    },
                    "pageTypesCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-page-types"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/page_types/{id}": {
      "get": {
        "summary": "Получение выбранного типа страницы",
        "operationId": "get-page-type",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pageType": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Главная",
                          "description": "тип страницы"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-page-type"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/integration_types": {
      "get": {
        "summary": "Получение списка типов интеграций",
        "operationId": "list-integration-types",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-integration-types"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с массивом `integrationTypes` и `integrationTypesCount`."
      }
    },
    "/api/integration_types/{id}": {
      "get": {
        "summary": "Получение выбранного типа интеграции",
        "operationId": "get-integration-type",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-integration-type"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/integrations": {
      "get": {
        "summary": "Получение списка интеграций",
        "operationId": "list-integrations",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-integrations"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с массивом `integrations` и `integrationsCount`."
      }
    },
    "/api/integrations/{id}": {
      "get": {
        "summary": "Получение выбранной интеграции",
        "operationId": "get-integration",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-integration"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/settings": {
      "get": {
        "summary": "Получение настроек",
        "operationId": "list-settings",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-settings"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с массивом `settings`."
      }
    },
    "/api/settings/{id}": {
      "get": {
        "summary": "Получение выбранной настройки",
        "operationId": "get-setting",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-setting"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200`."
      }
    },
    "/api/delivery_types": {
      "get": {
        "summary": "Получение списка типов доставки",
        "operationId": "list-delivery-types-erp",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-delivery-types-erp"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с массивом `deliveryTypes` и `deliveryTypesCount`."
      }
    },
    "/api/block_types": {
      "get": {
        "summary": "Получение списка типов блоков",
        "operationId": "list-block-types",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "blockTypes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ"
                          },
                          "name": {
                            "type": "string",
                            "example": "Слайдер",
                            "description": "тип блока"
                          }
                        }
                      }
                    },
                    "blockTypesCount": {
                      "type": "integer",
                      "example": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#list-block-types"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/block_types/{id}": {
      "get": {
        "summary": "Получение выбранного типа блока",
        "operationId": "get-block-type",
        "tags": [
          "ERP / Справочники"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "blockType": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "Слайдер",
                          "description": "тип блока"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Справочники/#get-block-type"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/tables/pages": {
      "get": {
        "summary": "Получение списка страниц (табличное представление)",
        "operationId": "list-pages",
        "tags": [
          "ERP / Страницы"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/TablesEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "contents": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 12,
                                "description": "ID страницы"
                              },
                              "code": {
                                "type": "string",
                                "nullable": true
                              },
                              "date": {
                                "type": "string",
                                "example": "13.05.2024",
                                "description": "дата создания (только в табличном представлении)"
                              },
                              "title": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Создание идивидуальго проекта"
                                  }
                                },
                                "description": "название с иконкой"
                              },
                              "type": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Страница"
                                  }
                                },
                                "description": "тип страницы с иконкой"
                              },
                              "slug": {
                                "type": "string",
                                "example": "proektnye-raboty",
                                "description": "идентификатор URL"
                              },
                              "creator": {
                                "type": "object",
                                "properties": {
                                  "icon": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://beta.back.erp.itecho.ru/storage/uploads/hJsFVET0jAcRiqK3Zu2mdkFVFL4LktdrT6kB7la8.jpg"
                                  },
                                  "value": {
                                    "type": "string",
                                    "example": "Иванов Василий"
                                  },
                                  "link": {
                                    "type": "string",
                                    "format": "uri",
                                    "example": "https://beta.gigma.ru/users/list-users/39"
                                  }
                                },
                                "description": "создатель с ссылкой"
                              },
                              "status": {
                                "type": "string",
                                "example": "Черновик",
                                "description": "статус публикации (только в табличном представлении; в ресурсе GET /api/pages/{id} этого поля нет)"
                              }
                            }
                          }
                        }
                      },
                      "required": [
                        "contents"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Страницы/#list-pages"
        },
        "description": "#### Параметры запроса - `application_id` [required] — ID приложения - `page_type_id` [nullable] — ID типа страницы - `order_by` [nullable] — сортировка: `date_asc`, `date_desc`, `popularity_asc`, `popularity_desc` - `query` [nullable] — поисковая строка - `page` [nullable] — номер страницы для пагинации - `per_page` [nullable] — элементов на странице"
      }
    },
    "/api/pages/{id}": {
      "get": {
        "summary": "Получение выбранной страницы (контента)",
        "operationId": "get-page",
        "tags": [
          "ERP / Страницы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "page": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 12,
                          "description": "ID страницы"
                        },
                        "code": {
                          "type": "string",
                          "nullable": true
                        },
                        "avatar": {
                          "type": "string",
                          "nullable": true
                        },
                        "is_page": {
                          "type": "boolean",
                          "example": true,
                          "description": "флаг (true=страница, false=блок)"
                        },
                        "views_count": {
                          "type": "integer",
                          "example": 27,
                          "description": "кол-во просмотров"
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "ID страницы"
                            },
                            "name": {
                              "type": "string",
                              "example": "Страница"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg",
                              "description": "аватар страницы"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-10-31T11:14:22.000000Z",
                              "description": "дата создания"
                            }
                          },
                          "description": "информация о типе"
                        },
                        "creator": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 39,
                              "description": "ID страницы"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/hJsFVET0jAcRiqK3Zu2mdkFVFL4LktdrT6kB7la8.jpg",
                              "description": "аватар страницы"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Василий"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Иванов"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Батькович"
                            },
                            "name": {
                              "type": "string",
                              "example": "Иванов Василий"
                            }
                          },
                          "description": "данные создателя"
                        },
                        "slug": {
                          "type": "string",
                          "example": "proektnye-raboty",
                          "description": "URL-идентификатор"
                        },
                        "title": {
                          "type": "string",
                          "example": "Создание идивидуальго проекта",
                          "description": "название"
                        },
                        "meta_title": {
                          "type": "string",
                          "nullable": true
                        },
                        "preview": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 2066,
                              "description": "ID страницы"
                            },
                            "name": {
                              "type": "string",
                              "example": "image1.png"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1,
                                  "description": "ID страницы"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg",
                                  "description": "аватар страницы"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z",
                                  "description": "дата создания"
                                }
                              },
                              "description": "информация о типе"
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/iT6Bvuu2DQrFIAF9SMkqnVtyh8uXvECkpIt4OkgR.png"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-11-13T09:51:36.000000Z",
                              "description": "дата создания"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-11-13T09:51:36.000000Z"
                            }
                          },
                          "description": "превью-изображение"
                        },
                        "description": {
                          "type": "string",
                          "example": "Создание идивидуальго проекта",
                          "description": "описание"
                        },
                        "meta_description": {
                          "type": "string",
                          "nullable": true
                        },
                        "content": {
                          "type": "string",
                          "example": "<p>В нашем интернет-магазине вы можете недорого купить скрабы для очищения и отшелушивания кожи. У нас представлена корейская косметика самых известных брендов, с подробным описанием, составами и отзывами покупателей. Мы предлагаем вам отшелушивающие скрабы по выгодной цене с доставкой по всей России, как в пункты выдачи заказов, так и по вашему персональному адресу. Возможен наложенный платеж. </p>",
                          "description": "контент в формате HTML"
                        },
                        "application": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 23,
                              "description": "ID страницы"
                            },
                            "name": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://nsksm.ru"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg",
                              "description": "аватар страницы"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-10-08T08:46:23.000000Z",
                              "description": "дата создания"
                            }
                          },
                          "description": "привязанное приложение"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-05-13T05:29:39.000000Z",
                          "description": "дата создания"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Страницы/#get-page"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      },
      "put": {
        "summary": "Редактирование страницы (контента)",
        "operationId": "update-page",
        "tags": [
          "ERP / Страницы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "page": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 36
                        },
                        "code": {
                          "type": "string",
                          "example": "1235",
                          "description": "код страницы"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            }
                          }
                        },
                        "is_page": {
                          "type": "boolean",
                          "example": true,
                          "description": "флаг (true/false)"
                        },
                        "views_count": {
                          "type": "integer",
                          "example": 0
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Страница"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-10-31T11:14:22.000000Z"
                            }
                          }
                        },
                        "creator": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 39
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/hJsFVET0jAcRiqK3Zu2mdkFVFL4LktdrT6kB7la8.jpg"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Василий"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Иванов"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Батькович"
                            },
                            "name": {
                              "type": "string",
                              "example": "Иванов Василий"
                            }
                          }
                        },
                        "slug": {
                          "type": "string",
                          "example": "news-3",
                          "description": "slug"
                        },
                        "title": {
                          "type": "string",
                          "example": "Скоро запуск веб-сайта!",
                          "description": "название"
                        },
                        "meta_title": {
                          "type": "string",
                          "example": "Запуск веб-сайта на платформе gigma.ru",
                          "description": "meta-заголовок"
                        },
                        "preview": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            }
                          }
                        },
                        "description": {
                          "type": "string",
                          "example": "Описание текстовом формате",
                          "description": "описание"
                        },
                        "meta_description": {
                          "type": "string",
                          "example": "Meta описание",
                          "description": "meta-описание"
                        },
                        "content": {
                          "type": "string",
                          "example": "HTML content",
                          "description": "HTML-контент"
                        },
                        "application": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 23
                            },
                            "name": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://nsksm.ru"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-10-08T08:46:23.000000Z"
                            }
                          }
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "Важное"
                              },
                              "avatar": {
                                "type": "string",
                                "format": "uri",
                                "example": "http://localhost:8000/storage/uploads/default.svg"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-11-14T14:01:51.000000Z"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-11-27T09:34:29.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Страницы/#update-page"
        },
        "description": "#### Параметры запроса - `code` [nullable, unique] — код страницы - `application_id` [required] — ID приложения - `avatar_id` [nullable] — ID аватара - `is_page` [required] — флаг (true/false) - `page_type_id` [required] — ID типа страницы - `slug` [required, unique] — slug - `title` [required, min:3, max:255] — название - `meta_title` [nullable, min:3, max:255] — meta-заголовок - `preview_id` [nullable] — ID превью - `description` [nullable] — описание - `meta_description` [nullable] — meta-описание - `content` [nullable] — HTML-контент - `tags` [array, nullable] — массив ID тегов",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "1235",
                    "description": "код страницы"
                  },
                  "application_id": {
                    "type": "integer",
                    "example": 23,
                    "description": "ID приложения"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID аватара"
                  },
                  "is_page": {
                    "type": "boolean",
                    "example": true,
                    "description": "флаг (true/false)"
                  },
                  "page_type_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Тип страницы Получить актуальные значения: `GET /api/page_types`"
                  },
                  "slug": {
                    "type": "string",
                    "example": "news-3",
                    "description": "slug"
                  },
                  "title": {
                    "type": "string",
                    "example": "Скоро запуск веб-сайта!",
                    "description": "название"
                  },
                  "meta_title": {
                    "type": "string",
                    "example": "Запуск веб-сайта на платформе gigma.ru",
                    "description": "meta-заголовок"
                  },
                  "preview_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID превью"
                  },
                  "description": {
                    "type": "string",
                    "example": "Описание текстовом формате",
                    "description": "описание"
                  },
                  "meta_description": {
                    "type": "string",
                    "example": "Meta описание",
                    "description": "meta-описание"
                  },
                  "content": {
                    "type": "string",
                    "example": "HTML content",
                    "description": "HTML-контент"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                },
                "required": [
                  "application_id",
                  "is_page",
                  "page_type_id",
                  "slug",
                  "title"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Удаление страницы (контента)",
        "operationId": "delete-page",
        "tags": [
          "ERP / Страницы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Страницы/#delete-page"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/pages": {
      "post": {
        "summary": "Добавление страницы",
        "operationId": "create-page",
        "tags": [
          "ERP / Страницы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "page": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 36
                        },
                        "code": {
                          "type": "string",
                          "example": "1235",
                          "description": "код страницы"
                        },
                        "avatar": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            }
                          }
                        },
                        "is_page": {
                          "type": "boolean",
                          "example": true,
                          "description": "флаг типа (true/false)"
                        },
                        "views_count": {
                          "type": "string",
                          "nullable": true
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Страница"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-10-31T11:14:22.000000Z"
                            }
                          }
                        },
                        "creator": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 39
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/hJsFVET0jAcRiqK3Zu2mdkFVFL4LktdrT6kB7la8.jpg"
                            },
                            "first_name": {
                              "type": "string",
                              "example": "Василий"
                            },
                            "last_name": {
                              "type": "string",
                              "example": "Иванов"
                            },
                            "middle_name": {
                              "type": "string",
                              "example": "Батькович"
                            },
                            "name": {
                              "type": "string",
                              "example": "Иванов Василий"
                            }
                          }
                        },
                        "slug": {
                          "type": "string",
                          "example": "news-3",
                          "description": "slug"
                        },
                        "title": {
                          "type": "string",
                          "example": "Скоро запуск веб-сайта!",
                          "description": "название"
                        },
                        "meta_title": {
                          "type": "string",
                          "example": "Запуск веб-сайта на платформе gigma.ru",
                          "description": "meta-заголовок"
                        },
                        "preview": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "logo.svg"
                            },
                            "type": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 1
                                },
                                "name": {
                                  "type": "string",
                                  "example": "Трудовой договор"
                                },
                                "avatar": {
                                  "type": "string",
                                  "format": "uri",
                                  "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg"
                                },
                                "created_at": {
                                  "type": "string",
                                  "format": "date-time",
                                  "example": "2024-03-27T07:00:46.000000Z"
                                }
                              }
                            },
                            "path": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg"
                            },
                            "link": {
                              "type": "string",
                              "nullable": true
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            },
                            "updated_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-04-14T20:04:32.000000Z"
                            }
                          }
                        },
                        "description": {
                          "type": "string",
                          "example": "Описание текстовом формате",
                          "description": "описание"
                        },
                        "meta_description": {
                          "type": "string",
                          "example": "Meta описание",
                          "description": "meta-описание"
                        },
                        "content": {
                          "type": "string",
                          "example": "HTML content",
                          "description": "HTML-контент"
                        },
                        "application": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 23
                            },
                            "name": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://nsksm.ru"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://beta.back.erp.itecho.ru/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-10-08T08:46:23.000000Z"
                            }
                          }
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1
                              },
                              "name": {
                                "type": "string",
                                "example": "Важное"
                              },
                              "avatar": {
                                "type": "string",
                                "format": "uri",
                                "example": "http://localhost:8000/storage/uploads/default.svg"
                              },
                              "created_at": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-11-14T14:01:51.000000Z"
                              }
                            }
                          }
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-11-27T09:34:29.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Страницы/#create-page"
        },
        "description": "#### Параметры запроса - `code` [nullable, unique] — код страницы - `application_id` [required] — ID приложения - `avatar_id` [nullable] — ID аватара - `is_page` [required] — флаг типа (true/false) - `page_type_id` [required] — ID типа страницы - `slug` [required, unique] — slug - `title` [required, min:3, max:255] — название - `meta_title` [nullable, min:3, max:255] — meta-заголовок - `preview_id` [nullable] — ID превью - `description` [nullable] — описание - `meta_description` [nullable] — meta-описание - `content` [nullable] — HTML-контент - `tags` [array, nullable] — массив ID тегов",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "example": "1235",
                    "description": "код страницы"
                  },
                  "application_id": {
                    "type": "integer",
                    "example": 23,
                    "description": "ID приложения"
                  },
                  "avatar_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID аватара"
                  },
                  "is_page": {
                    "type": "boolean",
                    "example": true,
                    "description": "флаг типа (true/false)"
                  },
                  "page_type_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "Тип страницы Получить актуальные значения: `GET /api/page_types`"
                  },
                  "slug": {
                    "type": "string",
                    "example": "news-3",
                    "description": "slug"
                  },
                  "title": {
                    "type": "string",
                    "example": "Скоро запуск веб-сайта!",
                    "description": "название"
                  },
                  "meta_title": {
                    "type": "string",
                    "example": "Запуск веб-сайта на платформе gigma.ru",
                    "description": "meta-заголовок"
                  },
                  "preview_id": {
                    "type": "integer",
                    "example": 1,
                    "description": "ID превью"
                  },
                  "description": {
                    "type": "string",
                    "example": "Описание текстовом формате",
                    "description": "описание"
                  },
                  "meta_description": {
                    "type": "string",
                    "example": "Meta описание",
                    "description": "meta-описание"
                  },
                  "content": {
                    "type": "string",
                    "example": "HTML content",
                    "description": "HTML-контент"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "integer",
                      "example": 1
                    }
                  }
                },
                "required": [
                  "application_id",
                  "is_page",
                  "page_type_id",
                  "slug",
                  "title"
                ]
              }
            }
          }
        }
      }
    },
    "/api/pages/{page}/history": {
      "get": {
        "summary": "Получение истории изменений страницы",
        "operationId": "page-history",
        "tags": [
          "ERP / Страницы"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Query"
          },
          {
            "$ref": "#/components/parameters/DateFrom"
          },
          {
            "$ref": "#/components/parameters/DateTo"
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Страницы/#page-history"
        },
        "description": "#### Ответ При успешном действии возвращается HTTP код `200` с записями истории: `id`, `icon`, `color`, `title`, `description`, `datetime`."
      }
    },
    "/api/page_tags": {
      "get": {
        "summary": "Получение списка тегов",
        "operationId": "list-page-tags",
        "tags": [
          "ERP / Страницы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pageTags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "description": "первичный ключ тега"
                          },
                          "name": {
                            "type": "string",
                            "example": "Важное",
                            "description": "название тега"
                          },
                          "avatar": {
                            "type": "string",
                            "format": "uri",
                            "example": "http://localhost:8000/storage/uploads/default.svg",
                            "description": "URL аватара"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-11-14T14:01:51.000000Z",
                            "description": "дата добавления в систему"
                          }
                        }
                      }
                    },
                    "pageTagsCount": {
                      "type": "integer",
                      "example": 2,
                      "description": "общее количество тегов"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Страницы/#list-page-tags"
        },
        "description": "#### Параметры запроса Параметры не передаются."
      }
    },
    "/api/sales_strategies": {
      "get": {
        "summary": "Список стратегий продаж",
        "operationId": "sales-strategies-list",
        "tags": [
          "ERP / Стратегии продаж"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "salesStrategies": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 1
                          },
                          "name": {
                            "type": "string",
                            "example": "Продать остатки"
                          },
                          "avatar": {
                            "type": "string",
                            "format": "uri",
                            "example": "https://api.gigma.ru/storage/uploads/default.svg"
                          },
                          "created_at": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-06-20T10:01:33.000000Z"
                          }
                        }
                      }
                    },
                    "salesStrategiesCount": {
                      "type": "integer",
                      "example": 1,
                      "description": "общее количество"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Стратегии продаж/#sales-strategies-list"
        },
        "description": "#### Ответ"
      }
    },
    "/api/sales_strategies/{id}": {
      "get": {
        "summary": "Стратегия продаж по ID",
        "operationId": "sales-strategy-get",
        "tags": [
          "ERP / Стратегии продаж"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "salesStrategy": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "name": {
                          "type": "string",
                          "example": "Продать остатки"
                        },
                        "avatar": {
                          "type": "string",
                          "format": "uri",
                          "example": "https://api.gigma.ru/storage/uploads/default.svg"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-06-20T10:01:33.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Стратегии продаж/#sales-strategy-get"
        },
        "description": "#### Параметры запроса Только `id` стратегии в пути URL."
      }
    },
    "/api/files": {
      "post": {
        "summary": "Загрузка файла",
        "operationId": "upload-file",
        "tags": [
          "ERP / Файлы"
        ],
        "parameters": [],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created (объект создан, тело ответа = созданный объект)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "file": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 2201,
                          "description": "первичный ключ"
                        },
                        "name": {
                          "type": "string",
                          "example": "downloader.py",
                          "description": "имя загруженного файла"
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1,
                              "description": "первичный ключ"
                            },
                            "name": {
                              "type": "string",
                              "example": "Трудовой договор",
                              "description": "имя загруженного файла"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-27T07:00:46.000000Z",
                              "description": "таймстампы"
                            }
                          },
                          "description": "объект типа файла"
                        },
                        "path": {
                          "type": "string",
                          "format": "uri",
                          "example": "https://api.gigma.ru/storage/uploads/7NYkKhv2Tm9CGlpcDzzLcsrKtrce8K39M4uU9pDw",
                          "description": "публичный URL файла"
                        },
                        "link": {
                          "type": "string",
                          "format": "uri",
                          "example": "https://google.ru",
                          "description": "произвольная URL ссылка (если передана)"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-12-03T10:42:18.000000Z",
                          "description": "таймстампы"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-12-03T10:42:18.000000Z"
                        }
                      },
                      "description": "содержимое файла (обязательно)"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Файлы/#upload-file"
        },
        "description": "#### Параметры запроса (form-data) - `file` — содержимое файла (обязательно) - `file_type_id` — ID типа файла из `/api/file_types` (обязательно) - `link` — произвольная URL ссылка (опционально, например на видео)",
        "x-used-in": [
          "17.3",
          "17.6",
          "17.7"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        }
      }
    },
    "/api/files/{id}": {
      "get": {
        "summary": "Получение файла по ID",
        "operationId": "get-file",
        "tags": [
          "ERP / Файлы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "file": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 1
                        },
                        "name": {
                          "type": "string",
                          "example": "logo.svg"
                        },
                        "type": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "integer",
                              "example": 1
                            },
                            "name": {
                              "type": "string",
                              "example": "Трудовой договор"
                            },
                            "avatar": {
                              "type": "string",
                              "format": "uri",
                              "example": "https://api.gigma.ru/storage/uploads/default.svg"
                            },
                            "created_at": {
                              "type": "string",
                              "format": "date-time",
                              "example": "2024-03-27T07:00:46.000000Z"
                            }
                          }
                        },
                        "path": {
                          "type": "string",
                          "format": "uri",
                          "example": "https://api.gigma.ru/storage/uploads/yjohncMkjTSnvJ7FH4vksOtDYUy9pO2HDwmNU5Hc.svg"
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-04-14T20:04:32.000000Z"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-04-14T20:04:32.000000Z"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Файлы/#get-file"
        },
        "description": "#### Пример запроса"
      },
      "delete": {
        "summary": "Удаление файла",
        "operationId": "delete-file",
        "tags": [
          "ERP / Файлы"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "security": [
          {
            "bearerErpAuth": []
          }
        ],
        "responses": {
          "204": {
            "description": "No Content (объект удалён, тело ответа пустое)"
          },
          "401": {
            "$ref": "#/components/responses/Unauthenticated"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "externalDocs": {
          "description": "Полное описание в markdown-доке",
          "url": "https://artypoul-docs-gigma-7b80.twc1.net/ERP/Файлы/#delete-file"
        },
        "description": "#### Ответ"
      }
    }
  }
}