{"openapi":"3.1.0","info":{"title":"Rukki Order Service — core PostgreSQL API v1","description":"Core Domain микросервис заказов для платформы Rukki 5.0.\n\n**Группа core-v1** — канонический REST API заказов и откликов в **PostgreSQL** (Flyway, primary JPA datasource).\n\n**REST API v1 (PostgreSQL, core-v1):**\n- `/api/v1/orders` — CRUD заказов, `POST …/complete` (`WaitingPayment`), отмена\n- `/api/v1/offers` — отклики исполнителей (list/count/CRUD, accept)\n- `/api/v1/orders/{orderId}/offers` — отклики по заказу\n- `/api/v1/orders/{id}/assignment` — назначение исполнителя\n- `/api/v1/orders/{id}/cancellation` — отмена заказа\n- `/api/v1/orders/{id}/status-transitions` — аудит переходов статусов\n- `/api/v1/orders/{orderId}/docs` — документы заказа\n- `/api/v1/orders/{orderId}/photos` — фото заказа\n- `/api/v1/orders/{orderId}/shifts` — смены заказа\n- `/api/v1/shift-types` — справочник типов смен\n- `/api/v1/orders:search` — поиск для ai-service / mcp-service\n- `/api/v1/orders/{id}:context` — контекст заказа для RAG\n\n\n**Интеграция Kafka (transactional outbox, не REST):**\n- **Publisher:** order-service (`outbox_events` → `OutboxProcessor`) → `rukki.order.events.v1`, `rukki.notification.dispatch.v1`.\n- **Consumer (входящие):**\n  - `rukki.billing.events.v1` — `eventType`=`PAYMENT_HOLD_SUCCESS` → статус `InProgress`;\n  - `rukki.billing.payment.status.v1` — `eventType`=`PAYMENT_SUCCEEDED` → статус `Paid` (+ `frontend_status`=`order_completely_finished`);\n  - `rukki.file.deleted.v1` — `eventType`=`FILE_DELETED` → удаление строк в `orders_photos` по `file_id` (Flyway V8).\n- **Жизненный цикл и таблица статусов:** см. блок ниже и `docs/order-lifecycle.md` в репозитории.\n- **Consumer group:** `order-service-group` (`app.kafka.consumer-group`).\n- **DLQ:** `rukki.order.outbox.v1.dlq`, `rukki.billing.events.v1.dlq`, `rukki.billing.payment.status.v1.dlq`, `rukki.order.file.deleted.v1.dlq`.\n- **Идемпотентность consumer:** таблица `processed_integration_events` по `eventId` (для `PAYMENT_SUCCEEDED` `eventId` вычисляется из `eventType`, `orderId` и `requestId` / `operationId` / `qrcId`).\n\n\n**Статусы заказа (`orders.status`):**\n\n| JSON / БД | Java enum | Назначение |\n|-----------|-----------|------------|\n| `Published` | `PUBLISHED` | Заказ создан и опубликован |\n| `WorkerSelected` | `WORKER_SELECTED` | Исполнитель назначен |\n| `WorkerSetOut` | `WORKER_SET_OUT` | Исполнитель выехал (legacy MySQL) |\n| `InProgress` | `IN_PROGRESS` | Работы ведутся |\n| `WaitingPayment` | `WAITING_PAYMENT` | Работы завершены, ожидается оплата (только v5) |\n| `PartiallyPaid` | `PARTIALLY_PAID` | Частичная оплата (v5 / billing, зарезервировано) |\n| `Paid` | `PAID` | Заказ полностью оплачен (v5 / billing) |\n| `Done` | `DONE` | Заказ завершён и закрыт |\n| `Canceled` | `CANCELED` | Заказ отменён |\n| `Deleted` | `DELETED` | Soft-delete / legacy |\n\n**Канонический сценарий v5 (REST + Kafka):**\n```\nPublished → WorkerSelected → InProgress → WaitingPayment → Paid\n             ↑ PAYMENT_HOLD_SUCCESS          ↑ POST …/complete   ↑ PAYMENT_SUCCEEDED\n```\nСтатус `Done` — финальное закрытие заказа (отдельный переход, не Kafka billing).\nВ legacy MySQL этапов `WaitingPayment` / `Paid` нет: оплата может переводить заказ из `InProgress` сразу в `Done`.\n\n\n**Авторизация (JWT, OAuth2 Resource Server):**\n- Заголовок `Authorization: Bearer <access_token>`.\n- В Swagger UI нажмите **Authorize** и вставьте **только значение токена** (префикс `Bearer` подставляется автоматически).\n- Роли — claim `realm_access.roles`: `MANAGER`, `ADMIN`, `SUPERADMIN`, `OPERATOR`, `WORKER`, `INTEGRATION`, `SERVICE`.\n- JWKS: `app.security.jwt.jwks-url`; проверка `iss` / `aud` (identity-service).\n\n\n**Пагинация и сортировка** (списки с `PagedResponse`):\n- Эндпоинты: `GET /api/v1/orders`, `GET /api/v1/offers`, `GET /api/v1/orders/{id}/status-transitions`, `GET /api/v1/legacy/orders`.\n- Query: `page`, `size`, `sort` (в Swagger — отдельные параметры).\n- **`page`** — номер страницы **с 1** (`page=1` — первая; `page=0` не используется).\n- **`size`** — элементов на странице. Core-списки: default/max — `app.web.pageable.*` (ENV `PAGE_DEFAULT_SIZE`, `PAGE_MAX_SIZE`; по умолчанию 50 и 100). Legacy MySQL-списки: default **20** при отсутствии `size`; max — как у core.\n- **`sort`** — `поле,направление` (например `createdAt,desc`); недопустимое поле → **400**.\n- Ответ: `PagedResponse` — `content`, `currentPage` (с 1), `pageSize`, `totalElements`.\n\n**Допустимые поля `sort`:**\n\n| Список | Поля |\n|--------|------|\n| `GET /api/v1/orders` | `createdAt`, `updatedAt`, `createdBy`, `updatedBy`, `status`, `title`, `customerId`, `budget`, `startDate`, `endDate`, `city` |\n| `GET /api/v1/offers` | `createdAt`, `updatedAt`, `createdBy`, `updatedBy`, `status`, `workerId`, `budget`, `startDate`, `endDate` |\n| `GET /api/v1/orders/{id}/status-transitions` | `createdAt`, `updatedAt`, `createdBy`, `updatedBy`, `toStatus`, `fromStatus`, `actorType` |\n| `GET /api/v1/legacy/orders` | `createdAt`, `status`, `title`, `creatorId`, `budget` |\n\n\n**Модель ролей (JWT, claim realm_access.roles):**\n- **MANAGER, ADMIN, SUPERADMIN, OPERATOR** — чтение и управление заказами;\n  OPERATOR также в `ORDER_SHIFT_STATUS` (PATCH статуса смены).\n- **USER/CUSTOMER** — создание/изменение своих заказов (`ORDER_WRITE`), отклики по заказу, accept (`POST /api/v1/offers/{id}/accept`).\n- **WORKER** — отклики; глобальный список `GET /api/v1/offers` (свои); PATCH статуса смены на назначенном заказе\n  (только `PLANNED→IN_PROGRESS→COMPLETED`); завершение заказа (`ORDER_COMPLETE`).\n- **INTEGRATION** — сервисные мутации откликов/назначений/отмен (`OFFER_WRITE`, `INTEGRATION_WRITE`,\n  `ORDER_CANCEL`); **не** входит в `ORDER_WRITE` (создание/PUT заказа — через USER/CUSTOMER/staff).\n- **ADMIN/SUPERADMIN** — мутации справочника типов смен (`/api/v1/shift-types`);\n  `GET …/shift-types?activeOnly=false` и `GET` неактивного типа по id — только они.\n- Идентификация участников — UUID из JWT claim `sub` (identity-service).\n- Query-эндпоинты (`/api/v1/orders:search`, `/api/v1/orders/{id}:context`) — **SERVICE**, **ADMIN** или **SUPERADMIN**.\n\n\nПоле **`vehicleTypeId`** в заказе — ссылка на тип техники; справочник — **equipment-service** (группа **legacy-v1**, путь `/api/v1/legacy/equipments`).\n\n**Не путать с legacy.** Order Legacy API (MySQL `orders`) — группа **legacy-v1**, путь `/api/v1/legacy/orders`.\n\n**Настройки CORS:** Настройки CORS микросервиса загружаются из конфигурации профиля:\n- **Разрешенные домены (Origins):** `https://*.rukki.pro, https://rukki.pro, http://localhost:8087, http://127.0.0.1:8087`\n- **Разрешенные HTTP-методы:** `GET, POST, PUT, PATCH, DELETE, OPTIONS`\n- **Разрешенные заголовки:** `Authorization, Content-Type, X-Requested-With, Accept, Origin`\n\nSwagger UI автоматически использует текущий домен для выполнения запросов. При развертывании в **Dokploy** параметры (`CORS_ALLOWED_ORIGINS`, `CORS_ALLOWED_METHODS`) задаются в секции **Environment** (значения через запятую, без пробелов).\n\n**Профиль запуска:** prod <br><br><span style=\"color:red\"><b>ВНИМАНИЕ (PROD):</b> В production Swagger должен быть закрыт: установите <i>springdoc.swagger-ui.enabled=false</i> и <i>springdoc.api-docs.enabled=false</i>.</span>\n\n**Build Time:** 2026-07-26T12:26:50.942Z | **Artifact:** order-service | **Java Version:** 21.0.11 | **OS:** Linux (amd64)","version":"1.0.0-SNAPSHOT"},"servers":[{"url":"https://orders.rukki.pro","description":"Production Server"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Order Cancellation API V1","description":"Каноническая отмена заказа (`POST /api/v1/orders/{id}/cancellation`): audit-запись + статус `CANCELLED`.\n"},{"name":"Order Assignment API V1","description":"Назначение исполнителя на заказ (`/api/v1/orders/{id}/assignment`).\n"},{"name":"Order Query API V1","description":"Query-эндпоинты для ai-service и mcp-service: поиск заказов и контекст для RAG.\nДоступ: роли SERVICE, ADMIN или SUPERADMIN.\n"},{"name":"Offers API V1","description":"Отклики исполнителей в PostgreSQL (`offers`, `/api/v1/offers`).\nСоздание отклика — `POST /api/v1/orders/{orderId}/offers`; accept — `POST /api/v1/offers/{id}/accept`.\n"},{"name":"Order Status Transitions API V1","description":"Аудит переходов статусов (`/api/v1/orders/{id}/status-transitions`). Запись не меняет `orders.status` — только журнал.\n"},{"name":"Orders API V1","description":"Канонические заказы в PostgreSQL (`orders`, `/api/v1/orders`).\nCRUD; `POST /{id}/complete` → `WaitingPayment`; оплата через Kafka billing → `Paid` (см. core-v1 info).\nОтмена — `POST /{id}/cancellation`; принятие отклика — `POST /api/v1/offers/{id}/accept`.\n"},{"name":"Shift Types API V1","description":"Справочник типов смен (`/api/v1/shift-types`) для CRM: код, название, длительность в часах.\nБюджет сделки хранится на экземпляре смены (`/orders/{orderId}/shifts`), не в справочнике.\n"},{"name":"Order Shifts API V1","description":"Смены заказа (`/api/v1/orders/{orderId}/shifts`).\nСтатусы: `PLANNED`, `IN_PROGRESS`, `COMPLETED`, `CANCELLED`.\nПри мутациях сервис синхронизирует денормализованные `orders.shifts`, `orders.current_shift`,\nа также `orders.budget` (сумма бюджетов активных смен) и `orders.hours_count` (сумма durationHours).\n"},{"name":"Order Photos API V1","description":"Фото заказа (`/api/v1/orders/{orderId}/photos`); файлы в S3 через file-service (`fileId`).\n"},{"name":"Order Docs API V1","description":"Документы заказа (`/api/v1/orders/{orderId}/docs`); файлы в S3 через file-service (`fileId`).\n"}],"paths":{"/api/v1/shift-types/{id}":{"get":{"tags":["Shift Types API V1"],"summary":"Получить тип смены по id (v1)","operationId":"findById","parameters":[{"name":"id","in":"path","description":"UUID типа смены","required":true,"schema":{"type":"string","format":"uuid"},"example":"a1000000-0000-4000-8000-000000000001"}],"responses":{"200":{"description":"Тип успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftTypeResponseV1"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"put":{"tags":["Shift Types API V1"],"summary":"Обновить тип смены (v1)","description":"Доступно: ADMIN, SUPERADMIN. Seed-записи с `updatable=false` нельзя менять.","operationId":"update","parameters":[{"name":"id","in":"path","description":"UUID типа смены","required":true,"schema":{"type":"string","format":"uuid"},"example":"a1000000-0000-4000-8000-000000000001"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateShiftTypeRequestV1"}}},"required":true},"responses":{"200":{"description":"Тип успешно обновлён","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftTypeResponseV1"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"delete":{"tags":["Shift Types API V1"],"summary":"Удалить тип смены (v1)","description":"Доступно: ADMIN, SUPERADMIN. Seed и типы, используемые в сменах, удалить нельзя.","operationId":"delete","parameters":[{"name":"id","in":"path","description":"UUID типа смены","required":true,"schema":{"type":"string","format":"uuid"},"example":"a1000000-0000-4000-8000-000000000001"}],"responses":{"204":{"description":"Тип успешно удалён"},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders/{orderId}/shifts/{shiftId}":{"get":{"tags":["Order Shifts API V1"],"summary":"Получить смену заказа по id (v1)","description":"Возвращает одну смену по UUID в рамках выбранного заказа.","operationId":"findById_1","parameters":[{"name":"orderId","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"},{"name":"shiftId","in":"path","description":"Уникальный идентификатор смены","required":true,"schema":{"type":"string","format":"uuid"},"example":"9fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"200":{"description":"Смена успешно получена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderShiftResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"put":{"tags":["Order Shifts API V1"],"summary":"Обновить смену заказа (v1, PUT)","description":"Обновляет переданные non-null поля смены. Значение `null` в теле игнорируется (поле не очищается) — семантика MapStruct IGNORE. Очистка: `clearBudget` / `clearShiftType` / `clearDurationHours`. Номер смены (`shiftNumber`) не меняется. При статусе `IN_PROGRESS` предыдущая смена «в работе» закрывается. Синхронизирует `orders.shifts` / `current_shift` / `budget` / `hours_count`.","operationId":"update_1","parameters":[{"name":"orderId","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"},{"name":"shiftId","in":"path","description":"Уникальный идентификатор смены","required":true,"schema":{"type":"string","format":"uuid"},"example":"9fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderShiftRequestV1"}}},"required":true},"responses":{"200":{"description":"Смена успешно обновлена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderShiftResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"delete":{"tags":["Order Shifts API V1"],"summary":"Удалить смену заказа (v1)","description":"Удаляет смену и пересчитывает денормализованные `orders.shifts` / `current_shift` / `budget` / `hours_count`.","operationId":"delete_1","parameters":[{"name":"orderId","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"},{"name":"shiftId","in":"path","description":"Уникальный идентификатор смены","required":true,"schema":{"type":"string","format":"uuid"},"example":"9fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"204":{"description":"Смена успешно удалена"},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"patch":{"tags":["Order Shifts API V1"],"summary":"Обновить статус смены заказа (v1)","description":"Изменяет только статус смены (и опционально фактические даты).\nДоступ: заказчик / OPERATOR / staff / назначенный WORKER\n(`ORDER_SHIFT_STATUS` + ownership). WORKER: только\n`PLANNED → IN_PROGRESS → COMPLETED`. Staff/заказчик: также\n`CANCELLED`/`COMPLETED → PLANNED` (повторное открытие).\nПуть: PATCH /api/v1/orders/{orderId}/shifts/{shiftId}.\n","operationId":"updateStatus","parameters":[{"name":"orderId","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"},{"name":"shiftId","in":"path","description":"Уникальный идентификатор смены","required":true,"schema":{"type":"string","format":"uuid"},"example":"9fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderShiftStatusRequestV1"}}},"required":true},"responses":{"200":{"description":"Статус смены успешно обновлён","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderShiftResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders/{id}":{"get":{"tags":["Orders API V1"],"summary":"Получить детальную информацию о заказе","description":"Возвращает заказ по его уникальному идентификатору (UUID).","operationId":"findById_2","parameters":[{"name":"id","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"200":{"description":"Успешное получение заказа","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"put":{"tags":["Orders API V1"],"summary":"Обновить заказ полностью (v1)","description":"Перезаписывает поля заказа (PUT). `photoFileIds` / `docFileIds`: null или [] — очистить вложения.","operationId":"update_2","parameters":[{"name":"id","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderRequestV1"}}},"required":true},"responses":{"200":{"description":"Заказ успешно обновлен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseV1"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"patch":{"tags":["Orders API V1"],"summary":"Обновить заказ частично (v1)","description":"Обновляет только переданные поля (PATCH).\n`photoFileIds` / `docFileIds`: null — не менять; [] — очистить; список — полная замена\n(UUID file-service, 0..20, без дубликатов).","operationId":"partialUpdate","parameters":[{"name":"id","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialUpdateOrderRequestV1"}}},"required":true},"responses":{"200":{"description":"Заказ успешно обновлен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseV1"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders/{id}/assignment":{"get":{"tags":["Order Assignment API V1"],"summary":"Получить назначение исполнителя по заказу (v1)","description":"Возвращает текущие данные назначения исполнителя по выбранному заказу.","operationId":"findByOrderId","parameters":[{"name":"id","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"200":{"description":"Назначение успешно получено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderAssignmentResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"put":{"tags":["Order Assignment API V1"],"summary":"Создать или обновить назначение исполнителя (v1)","description":"Создает новое назначение исполнителя по заказу или обновляет существующее.","operationId":"upsert","parameters":[{"name":"id","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertOrderAssignmentRequestV1"}}},"required":true},"responses":{"200":{"description":"Назначение успешно создано или обновлено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderAssignmentResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"patch":{"tags":["Order Assignment API V1"],"summary":"Обновить статус назначения исполнителя (v1)","description":"Изменяет только статус назначения исполнителя без полного пересоздания сущности. Основной путь: PATCH /api/v1/orders/{id}/assignment.","operationId":"updateStatus_1","parameters":[{"name":"id","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderAssignmentStatusRequestV1"}}},"required":true},"responses":{"200":{"description":"Статус назначения успешно обновлен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderAssignmentResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/offers/{id}":{"get":{"tags":["Offers API V1"],"summary":"Получить отклик по UUID (v1)","operationId":"findById_3","parameters":[{"name":"id","in":"path","description":"UUID отклика","required":true,"schema":{"type":"string","format":"uuid"},"example":"0fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"200":{"description":"Отклик успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferResponseV1"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"put":{"tags":["Offers API V1"],"summary":"Обновить отклик (PUT, v1)","operationId":"update_3","parameters":[{"name":"id","in":"path","description":"UUID отклика","required":true,"schema":{"type":"string","format":"uuid"},"example":"0fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOfferRequestV1"}}},"required":true},"responses":{"200":{"description":"Отклик успешно обновлён","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"patch":{"tags":["Offers API V1"],"summary":"Частично обновить отклик (PATCH, v1)","operationId":"partialUpdate_1","parameters":[{"name":"id","in":"path","description":"UUID отклика","required":true,"schema":{"type":"string","format":"uuid"},"example":"0fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartialUpdateOfferRequestV1"}}},"required":true},"responses":{"200":{"description":"Отклик успешно обновлён","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/shift-types":{"get":{"tags":["Shift Types API V1"],"summary":"Получить справочник типов смен (v1)","description":"По умолчанию только `active=true`. Параметр `activeOnly=false` (включая неактивные) и `GET /{id}` неактивного типа — только ADMIN/SUPERADMIN.","operationId":"findAll","parameters":[{"name":"activeOnly","in":"query","description":"Только активные типы (по умолчанию true)","required":false,"schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"Список типов успешно получен","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShiftTypeResponseV1"}}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"post":{"tags":["Shift Types API V1"],"summary":"Создать тип смены (v1)","description":"Доступно: ADMIN, SUPERADMIN.","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShiftTypeRequestV1"}}},"required":true},"responses":{"201":{"description":"Тип успешно создан","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShiftTypeResponseV1"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders":{"get":{"tags":["Orders API V1"],"summary":"Получить список заказов","description":"Возвращает список заказов с поддержкой пагинации и сортировки","operationId":"all","parameters":[{"name":"title","in":"query","description":"Поиск по подстроке в заголовке заказа (без учета регистра)","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"Фильтрация по статусу заказа (`Published`, `Paid`, `Done`, … — см. Swagger core-v1)","required":false,"schema":{"type":"string","enum":["Canceled","Published","WorkerSelected","WorkerSetOut","InProgress","WaitingPayment","PartiallyPaid","Paid","Done","Deleted"]}},{"name":"customerId","in":"query","description":"Фильтрация по идентификатору заказчика","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"workerId","in":"query","description":"Фильтрация по идентификатору исполнителя","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"city","in":"query","description":"Поиск по подстроке в городе (без учета регистра)","required":false,"schema":{"type":"string"}},{"name":"managerId","in":"query","description":"Фильтрация по идентификатору менеджера","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"companyId","in":"query","description":"Фильтрация по идентификатору компании","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"categoryId","in":"query","description":"Фильтрация по идентификатору категории","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"vehicleTypeId","in":"query","description":"Фильтрация по идентификатору типа техники","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"paymentType","in":"query","description":"Фильтрация по типу оплаты","required":false,"schema":{"type":"string","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"]}},{"name":"page","in":"query","description":"Номер страницы (с 1; первая страница — page=1)","required":false,"schema":{"type":"integer","default":1,"minimum":1},"example":"1"},{"name":"size","in":"query","description":"Размер страницы (по умолчанию 50, макс. 100)","required":false,"schema":{"type":"integer","default":50,"maximum":100,"minimum":1},"example":"50"},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Список заказов успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseOrderResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"post":{"tags":["Orders API V1"],"summary":"Создать заказ (v1)","description":"Создаёт заказ и автоматически первую смену (`shiftNumber=1`, `PLANNED`);\n`orders.budget` копируется на эту смену. Повторный `POST …/shifts` с\n`shiftNumber=1` вернёт 409. Адреса: `addresses[]` или legacy `addressString`.\n`photoFileIds` / `docFileIds` — UUID file-service (0..20); null или [] — без вложений.\n","operationId":"create_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderRequestV1"}}},"required":true},"responses":{"201":{"description":"Заказ успешно создан","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders:search":{"post":{"tags":["Order Query API V1"],"summary":"Поиск заказов для AI/MCP (v1)","description":"Возвращает выборку заказов по внутренним бизнес-фильтрам для сценариев AI и MCP.","operationId":"search","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalOrderSearchRequestV1"}}},"required":true},"responses":{"200":{"description":"Результат поиска успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalOrderSearchResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders/{orderId}/shifts":{"get":{"tags":["Order Shifts API V1"],"summary":"Получить список смен заказа (v1)","description":"Возвращает все смены выбранного заказа, упорядоченные по `shiftNumber` (возрастание).","operationId":"findByOrderId_1","parameters":[{"name":"orderId","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"200":{"description":"Список смен успешно получен","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderShiftResponseV1"}}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"post":{"tags":["Order Shifts API V1"],"summary":"Создать смену заказа (v1)","description":"Создаёт новую смену. Если `shiftNumber` не задан — берётся следующий свободный\n(`max(shift_number) + 1`). При статусе `IN_PROGRESS` предыдущая смена «в работе»\nпереводится в `COMPLETED`. Синхронизирует `orders.shifts` / `current_shift` /\n`budget` / `hours_count`.\n","operationId":"create_2","parameters":[{"name":"orderId","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderShiftRequestV1"}}},"required":true},"responses":{"201":{"description":"Смена успешно создана","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderShiftResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders/{orderId}/offers":{"get":{"tags":["Offers API V1"],"summary":"Получить отклики по заказу (v1)","operationId":"findByOrderId_2","parameters":[{"name":"orderId","in":"path","description":"UUID заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"200":{"description":"Список откликов по заказу","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OfferResponseV1"}}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"post":{"tags":["Offers API V1"],"summary":"Создать отклик на заказ (v1)","operationId":"create_3","parameters":[{"name":"orderId","in":"path","description":"UUID заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOfferRequestV1"}}},"required":true},"responses":{"201":{"description":"Отклик успешно создан","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders/{id}/status-transitions":{"get":{"tags":["Order Status Transitions API V1"],"summary":"Получить историю переходов статусов заказа (v1)","description":"Возвращает постраничный аудит переходов статуса выбранного заказа.","operationId":"findByOrderId_3","parameters":[{"name":"id","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"},{"name":"page","in":"query","description":"Номер страницы (с 1; первая страница — page=1)","required":false,"schema":{"type":"integer","default":1,"minimum":1},"example":"1"},{"name":"size","in":"query","description":"Размер страницы (по умолчанию 50, макс. 100)","required":false,"schema":{"type":"integer","default":50,"maximum":100,"minimum":1},"example":"50"},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"История переходов успешно получена","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseOrderStatusTransitionResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"post":{"tags":["Order Status Transitions API V1"],"summary":"Создать запись о переходе статуса заказа (v1)","description":"Создает новую запись в журнале переходов статусов заказа.","operationId":"create_4","parameters":[{"name":"id","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderStatusTransitionRequestV1"}}},"required":true},"responses":{"201":{"description":"Запись перехода успешно создана","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusTransitionResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders/{id}/complete":{"post":{"tags":["Orders API V1"],"summary":"Завершить заказ (v1)","description":"Переводит заказ в `WaitingPayment` после завершения работ.\nДопустимые исходные статусы: `InProgress`, `WorkerSelected`.\nПовторный вызов — no-op, если заказ уже в `WaitingPayment` или `Done`.\n","operationId":"complete","parameters":[{"name":"id","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"200":{"description":"Заказ переведён в ожидание оплаты","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders/{id}/cancellation":{"get":{"tags":["Order Cancellation API V1"],"summary":"Получить данные об отмене заказа (v1)","description":"Возвращает параметры и причину отмены по выбранному заказу.","operationId":"findByOrderId_4","parameters":[{"name":"id","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"200":{"description":"Данные отмены успешно получены","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCancellationResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}},"post":{"tags":["Order Cancellation API V1"],"summary":"Зафиксировать отмену заказа (v1)","description":"Создает запись об отмене заказа с причиной, типом инициатора и дополнительными метаданными.","operationId":"create_5","parameters":[{"name":"id","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderCancellationRequestV1"}}},"required":true},"responses":{"201":{"description":"Отмена заказа успешно зафиксирована","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCancellationResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/offers/{id}/accept":{"post":{"tags":["Offers API V1"],"summary":"Принять отклик (v1)","description":"Принимает отклик и переводит заказ в статус назначения исполнителя.","operationId":"accept","parameters":[{"name":"id","in":"path","description":"UUID отклика","required":true,"schema":{"type":"string","format":"uuid"},"example":"0fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"200":{"description":"Отклик принят, заказ обновлён","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders/{orderId}/photos":{"get":{"tags":["Order Photos API V1"],"summary":"Список фото заказа (v1)","operationId":"findByOrderId_5","parameters":[{"name":"orderId","in":"path","description":"UUID канонического заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"200":{"description":"Фото получены","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderPhotoResponseV1"}}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders/{orderId}/photos/{photoId}":{"get":{"tags":["Order Photos API V1"],"summary":"Фото заказа по id (v1)","operationId":"findById_4","parameters":[{"name":"orderId","in":"path","description":"UUID канонического заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"},{"name":"photoId","in":"path","description":"UUID фото","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"200":{"description":"Фото получено","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderPhotoResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders/{orderId}/docs":{"get":{"tags":["Order Docs API V1"],"summary":"Список документов заказа (v1)","operationId":"findByOrderId_6","parameters":[{"name":"orderId","in":"path","description":"UUID канонического заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"200":{"description":"Документы получены","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrderDocResponseV1"}}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders/{orderId}/docs/{docId}":{"get":{"tags":["Order Docs API V1"],"summary":"Документ заказа по id (v1)","operationId":"findById_5","parameters":[{"name":"orderId","in":"path","description":"UUID канонического заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"},{"name":"docId","in":"path","description":"UUID документа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"200":{"description":"Документ получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDocResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders/{id}:context":{"get":{"tags":["Order Query API V1"],"summary":"Контекст заказа для AI/MCP (v1)","description":"Возвращает канонический текст и метаданные заказа для prompt-assembly и RAG.","operationId":"context","parameters":[{"name":"id","in":"path","description":"Уникальный идентификатор заказа","required":true,"schema":{"type":"string","format":"uuid"},"example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"}],"responses":{"200":{"description":"Контекст заказа успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalOrderContextResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/orders/count":{"get":{"tags":["Orders API V1"],"summary":"Получить общее количество заказов","description":"Возвращает общее число заказов в системе","operationId":"count","responses":{"200":{"description":"Количество заказов успешно получено","content":{"application/json":{"schema":{"type":"integer","format":"int64"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/offers":{"get":{"tags":["Offers API V1"],"summary":"Получить список откликов (v1)","description":"Возвращает страницу откликов с фильтрацией и сортировкой (page, size, sort — one-indexed page).\nДоступ: staff и WORKER (свои отклики). Заказчик — `GET /api/v1/orders/{orderId}/offers`.\n","operationId":"all_1","parameters":[{"name":"orderId","in":"query","description":"UUID заказа","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"workerId","in":"query","description":"ID исполнителя","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","description":"Статус отклика","required":false,"schema":{"type":"string","enum":["PENDING","ACCEPTED","REJECTED","WAITING_FOR_PAYMENT"]}},{"name":"isRemoved","in":"query","description":"Признак удалённого отклика","required":false,"schema":{"type":"boolean"}},{"name":"page","in":"query","description":"Номер страницы (с 1; первая страница — page=1)","required":false,"schema":{"type":"integer","default":1,"minimum":1},"example":"1"},{"name":"size","in":"query","description":"Размер страницы (по умолчанию 50, макс. 100)","required":false,"schema":{"type":"integer","default":50,"maximum":100,"minimum":1},"example":"50"},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Список откликов успешно получен","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PagedResponseOfferResponseV1"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}},"/api/v1/offers/count":{"get":{"tags":["Offers API V1"],"summary":"Получить количество откликов (v1)","operationId":"count_1","parameters":[{"name":"orderId","in":"query","description":"UUID заказа","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"workerId","in":"query","description":"ID исполнителя","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","description":"Статус отклика","required":false,"schema":{"type":"string","enum":["PENDING","ACCEPTED","REJECTED","WAITING_FOR_PAYMENT"]}},{"name":"isRemoved","in":"query","description":"Признак удалённого отклика","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Количество успешно получено","content":{"application/json":{"schema":{"type":"integer","format":"int64"}}}},"400":{"description":"Некорректный запрос (ошибка валидации параметров)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":400,"message":"Ошибка валидации","details":{"title":["Заголовок обязателен"]},"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"401":{"description":"Отсутствует или недействителен токен авторизации (JWT)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":401,"message":"Отсутствует или недействителен токен авторизации (JWT)","details":null,"path":"/api/v1/orders","timestamp":"2026-03-26T10:32:26.961Z"}}}},"403":{"description":"Недостаточно прав для выполнения операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":403,"message":"Доступ запрещен","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"404":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":404,"message":"Заказ не найден: 8fa85f64-5717-4562-b3fc-2c963f66afa6","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"409":{"description":"Конфликт параллельного изменения или дублирование операции","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":409,"message":"Данные были изменены другим пользователем. Обновите страницу и повторите попытку.","details":null,"path":"/api/v1/orders/8fa85f64-5717-4562-b3fc-2c963f66afa6","timestamp":"2026-03-26T10:32:26.961Z"}}}},"422":{"description":"Нарушение бизнес-правил или неверное состояние сущности","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":422,"message":"Нельзя принять отклик для заказа в статусе: ASSIGNED","details":null,"path":"/api/v1/offers/0fa85f64-5717-4562-b3fc-2c963f66afa6/accept","timestamp":"2026-04-02T10:32:26.961Z"}}}},"500":{"description":"Внутренняя ошибка сервера","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorDto"},"example":{"status":500,"message":"Произошла непредвиденная ошибка","details":null,"path":"/api/v1/orders","timestamp":"2026-04-02T10:32:26.961Z"}}}}}}}},"components":{"schemas":{"UpdateShiftTypeRequestV1":{"type":"object","description":"Тело запроса с новыми данными типа","properties":{"code":{"type":"string","description":"Стабильный код","example":"SHIFT_10H","maxLength":32,"minLength":0},"name":{"type":"string","description":"Название для UI","example":"Смена 10 час.","maxLength":255,"minLength":0},"durationHours":{"type":"integer","format":"int32","description":"Длительность в часах","example":10,"minimum":1},"sortOrder":{"type":"integer","format":"int32","description":"Порядок сортировки","example":50,"minimum":0},"active":{"type":"boolean","description":"Активен для выбора","example":true}}},"ApiErrorDto":{"type":"object","description":"Структура ошибки API","properties":{"status":{"type":"integer","format":"int32","description":"HTTP статус ошибки","example":400},"message":{"type":"string","description":"Краткое сообщение об ошибке","example":"Ошибка валидации запроса"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Дополнительные детали (например, список ошибок валидации по каждому полю)"},"path":{"type":"string","description":"URI ресурса, на котором произошла ошибка","example":"/api/v1/orders"},"timestamp":{"type":"string","format":"date-time","description":"Время возникновения ошибки"}}},"ShiftTypeResponseV1":{"type":"object","description":"Тип смены из справочника (`shift_types`)","properties":{"id":{"type":"string","format":"uuid","description":"UUID типа смены","example":"a1000000-0000-4000-8000-000000000001"},"code":{"type":"string","description":"Стабильный код","example":"SHIFT_8H"},"name":{"type":"string","description":"Название для UI","example":"Смена 8 час."},"durationHours":{"type":"integer","format":"int32","description":"Длительность смены в часах","example":8},"sortOrder":{"type":"integer","format":"int32","description":"Порядок сортировки","example":10},"active":{"type":"boolean","description":"Доступен для выбора в UI","example":true},"updatable":{"type":"boolean","description":"Разрешено изменение записи","example":false},"deletable":{"type":"boolean","description":"Разрешено удаление записи","example":false},"createdAt":{"type":"string","format":"date-time","description":"Дата и время создания"},"updatedAt":{"type":"string","format":"date-time","description":"Дата и время последнего обновления"},"createdBy":{"type":"string","description":"Идентификатор создателя записи (JWT sub или ANONYMOUS)"},"updatedBy":{"type":"string","description":"Идентификатор последнего обновившего запись (JWT sub или ANONYMOUS)"}}},"UpdateOrderShiftRequestV1":{"type":"object","description":"Тело запроса с новыми данными смены","properties":{"status":{"type":"string","description":"Статус смены (`PLANNED`, `IN_PROGRESS`, `COMPLETED`, `CANCELLED`)","enum":["PLANNED","IN_PROGRESS","COMPLETED","CANCELLED"],"example":"IN_PROGRESS"},"shiftTypeId":{"type":"string","format":"uuid","description":"UUID типа смены из справочника","example":"a1000000-0000-4000-8000-000000000001"},"clearShiftType":{"type":"boolean","description":"true — отвязать тип смены (игнорирует shiftTypeId)","example":false},"durationHours":{"type":"integer","format":"int32","description":"Длительность смены в часах","example":8,"minimum":1},"clearDurationHours":{"type":"boolean","description":"true — обнулить длительность (игнорирует durationHours)","example":false},"budget":{"type":"number","description":"Бюджет этой смены","example":15000.0,"minimum":0.00},"clearBudget":{"type":"boolean","description":"true — обнулить бюджет смены (игнорирует budget)","example":false},"plannedStart":{"type":"string","format":"date-time","description":"Планируемое начало смены","example":"2026-07-16T09:00:00Z"},"plannedEnd":{"type":"string","format":"date-time","description":"Планируемое окончание смены","example":"2026-07-16T18:00:00Z"},"actualStart":{"type":"string","format":"date-time","description":"Фактическое начало смены","example":"2026-07-16T09:15:00Z"},"actualEnd":{"type":"string","format":"date-time","description":"Фактическое окончание смены","example":"2026-07-16T17:45:00Z"},"notes":{"type":"string","description":"Примечание к смене","example":"День 1","maxLength":4000,"minLength":0},"metadata":{"type":"object","additionalProperties":{"type":"object"},"description":"Метаданные смены (JSON)"},"plannedRangeValid":{"type":"boolean"},"actualRangeValid":{"type":"boolean"},"shiftTypeClearConsistent":{"type":"boolean"},"budgetClearConsistent":{"type":"boolean"},"durationClearConsistent":{"type":"boolean"}}},"OrderShiftResponseV1":{"type":"object","description":"Смена заказа (`order_shifts`)","properties":{"id":{"type":"string","format":"uuid","description":"UUID смены","example":"9fa85f64-5717-4562-b3fc-2c963f66afa6"},"orderId":{"type":"string","format":"uuid","description":"UUID заказа","example":"8fa85f64-5717-4562-b3fc-2c963f66afa6"},"shiftNumber":{"type":"integer","format":"int32","description":"Порядковый номер смены (1-based)","example":1},"status":{"type":"string","description":"Статус смены (`PLANNED`, `IN_PROGRESS`, `COMPLETED`, `CANCELLED`)","enum":["PLANNED","IN_PROGRESS","COMPLETED","CANCELLED"],"example":"PLANNED"},"shiftTypeId":{"type":"string","format":"uuid","description":"UUID типа смены из справочника","example":"a1000000-0000-4000-8000-000000000001"},"shiftTypeCode":{"type":"string","description":"Код типа смены","example":"SHIFT_8H"},"shiftTypeName":{"type":"string","description":"Название типа смены","example":"Смена 8 час."},"durationHours":{"type":"integer","format":"int32","description":"Длительность смены в часах (снимок)","example":8},"budget":{"type":"number","description":"Бюджет этой смены","example":15000.0},"plannedStart":{"type":"string","format":"date-time","description":"Планируемое начало смены"},"plannedEnd":{"type":"string","format":"date-time","description":"Планируемое окончание смены"},"actualStart":{"type":"string","format":"date-time","description":"Фактическое начало смены"},"actualEnd":{"type":"string","format":"date-time","description":"Фактическое окончание смены"},"notes":{"type":"string","description":"Примечание к смене","example":"Доставка и монтаж"},"metadata":{"type":"object","additionalProperties":{"type":"object"},"description":"Дополнительные метаданные смены (JSON)"},"createdAt":{"type":"string","format":"date-time","description":"Дата и время создания"},"updatedAt":{"type":"string","format":"date-time","description":"Дата и время последнего обновления"},"createdBy":{"type":"string","description":"Идентификатор создателя записи (JWT sub или ANONYMOUS)"},"updatedBy":{"type":"string","description":"Идентификатор последнего обновившего запись (JWT sub или ANONYMOUS)"}}},"OrderAddressRequestV1":{"type":"object","description":"Адрес заказа (точка маршрута / работ) с опциональной геолокацией","properties":{"addressType":{"type":"string","description":"Тип точки","enum":["FEED","UNLOAD","DEPARTURE"],"example":"FEED"},"addressString":{"type":"string","description":"Адрес","example":"Москва, ул. Тверская, 1","maxLength":500,"minLength":0},"latitude":{"type":"number","format":"double","description":"Широта","example":55.7558,"maximum":90.0,"minimum":-90.0},"longitude":{"type":"number","format":"double","description":"Долгота","example":37.6173,"maximum":180.0,"minimum":-180.0},"coordinatesPairValid":{"type":"boolean"}},"required":["addressString"]},"UpdateOrderRequestV1":{"type":"object","description":"Тело запроса с новыми данными заказа","properties":{"title":{"type":"string","description":"Новый заголовок заказа","maxLength":150,"minLength":5},"description":{"type":"string","description":"Новое подробное описание","maxLength":2000,"minLength":0},"budget":{"type":"number","description":"Новый бюджет","example":6000.0,"minimum":0.0},"categoryId":{"type":"string","format":"uuid","description":"UUID категории работ","example":"4fa85f64-5717-4562-b3fc-2c963f66afa6"},"vehicleTypeId":{"type":"string","format":"uuid","description":"UUID типа требуемой спецтехники","example":"2fa85f64-5717-4562-b3fc-2c963f66afa7"},"managerId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"deliveryCost":{"type":"number","minimum":0.0},"paymentType":{"type":"string","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"]},"availablePaymentType":{"type":"string","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"]},"addresses":{"type":"array","description":"Адреса: ровно 1 FEED, опционально 1 DEPARTURE, 0..10 UNLOAD (полная замена)","items":{"$ref":"#/components/schemas/OrderAddressRequestV1"},"maxItems":12,"minItems":0},"city":{"type":"string","description":"Город","maxLength":255,"minLength":0},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"details":{"type":"object","additionalProperties":{"type":"object"}},"vehicleRequirements":{"type":"object","additionalProperties":{"type":"object"}},"photoFileIds":{"type":"array","description":"Идентификаторы файлов фотографий (0..20); null или [] — без фото; порядок сохраняется","items":{"format":"uuid"},"maxItems":20,"minItems":0},"docFileIds":{"type":"array","description":"Идентификаторы файлов документов (0..20); null или [] — без документов; порядок сохраняется","items":{"format":"uuid"},"maxItems":20,"minItems":0}},"required":["addresses","budget","title"]},"OrderAddressResponseV1":{"type":"object","description":"Адрес заказа с геолокацией","properties":{"id":{"type":"string","format":"uuid"},"addressType":{"type":"string","enum":["FEED","UNLOAD","DEPARTURE"]},"addressString":{"type":"string"},"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}}},"OrderResponseV1":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"legacyId":{"type":"integer","format":"int64"},"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","description":"Статус жизненного цикла (`Published`, `WorkerSelected`, `InProgress`, `WaitingPayment`, `PartiallyPaid`, `Paid`, `Done`, `Canceled`, `Deleted`)","enum":["Canceled","Published","WorkerSelected","WorkerSetOut","InProgress","WaitingPayment","PartiallyPaid","Paid","Done","Deleted"],"example":"Published"},"customerId":{"type":"string","format":"uuid"},"workerId":{"type":"string","format":"uuid"},"managerId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"categoryId":{"type":"string","format":"uuid"},"vehicleTypeId":{"type":"string","format":"uuid"},"vehicleId":{"type":"string","format":"uuid","description":"UUID экземпляра техники (equipment-service), если назначен на заказ"},"budget":{"type":"number"},"paymentType":{"type":"string","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"]},"availablePaymentType":{"type":"string","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"]},"deliveryCost":{"type":"number"},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/OrderAddressResponseV1"}},"addressString":{"type":"string"},"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"},"city":{"type":"string"},"details":{"type":"object","additionalProperties":{"type":"object"}},"vehicleRequirements":{"type":"object","additionalProperties":{"type":"object"}},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"shifts":{"type":"integer","format":"int32","description":"Число активных (не CANCELLED) смен заказа","example":1},"currentShift":{"type":"integer","format":"int32","description":"Номер текущей смены (IN_PROGRESS или max активной)","example":1},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"isDeleted":{"type":"boolean"}}},"UpsertOrderAssignmentRequestV1":{"type":"object","description":"Запрос на создание/обновление назначения исполнителя для заказа","properties":{"workerId":{"type":"string","format":"uuid","description":"UUID исполнителя","example":"afa85f64-5717-4562-b3fc-2c963f66afa6"},"assignedById":{"type":"integer","format":"int64","description":"ID инициатора назначения","example":501},"assignedByType":{"type":"string","description":"Тип инициатора назначения","enum":["SYSTEM","CUSTOMER","WORKER","MANAGER","ADMIN","INTEGRATION"],"example":"MANAGER"},"assignmentStatus":{"type":"string","description":"Текущий статус назначения","enum":["ACTIVE","ACCEPTED","EXPIRED","CANCELLED"],"example":"ACTIVE"},"assignedAt":{"type":"string","format":"date-time","description":"Дата/время назначения"},"acceptedAt":{"type":"string","format":"date-time","description":"Дата/время принятия назначения исполнителем"},"expiresAt":{"type":"string","format":"date-time","description":"Дата/время истечения назначения"},"source":{"type":"string","description":"Источник назначения","enum":["INTERNAL","AUTO","MANUAL","INTEGRATION"],"example":"INTERNAL"},"metadata":{"type":"object","additionalProperties":{"type":"object"},"description":"Метаданные назначения в формате JSON"}},"required":["workerId"]},"OrderAssignmentResponseV1":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orderId":{"type":"string","format":"uuid"},"workerId":{"type":"string","format":"uuid"},"assignedById":{"type":"integer","format":"int64"},"assignedByType":{"type":"string","enum":["SYSTEM","CUSTOMER","WORKER","MANAGER","ADMIN","INTEGRATION"]},"assignmentStatus":{"type":"string","enum":["ACTIVE","ACCEPTED","EXPIRED","CANCELLED"]},"assignedAt":{"type":"string","format":"date-time"},"acceptedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"source":{"type":"string","enum":["INTERNAL","AUTO","MANUAL","INTEGRATION"]},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}}},"UpdateOfferRequestV1":{"type":"object","description":"Полное обновление отклика","properties":{"workerId":{"type":"string","format":"uuid","description":"UUID исполнителя","example":"afa85f64-5717-4562-b3fc-2c963f66afa6"},"vehicleId":{"type":"string","format":"uuid","description":"UUID экземпляра техники (equipment-service)"},"budget":{"type":"number","description":"Предложенный бюджет"},"description":{"type":"string","description":"Описание отклика"},"paymentType":{"type":"string","description":"Тип оплаты","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"]},"deliveryCost":{"type":"number","description":"Стоимость доставки"},"startDate":{"type":"string","format":"date-time","description":"Плановая дата начала"},"endDate":{"type":"string","format":"date-time","description":"Плановая дата окончания"}}},"OfferResponseV1":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orderId":{"type":"string","format":"uuid"},"workerId":{"type":"string","format":"uuid"},"budget":{"type":"number"},"description":{"type":"string"},"paymentType":{"type":"string","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"]},"deliveryCost":{"type":"number"},"deliveryCommission":{"type":"number"},"status":{"type":"string","enum":["PENDING","ACCEPTED","REJECTED","WAITING_FOR_PAYMENT"]},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"vehicleId":{"type":"integer","format":"int64"},"equipmentVehicleId":{"type":"string","format":"uuid","description":"UUID экземпляра техники (equipment-service)"},"isRemoved":{"type":"integer","format":"int32"},"shifts":{"type":"integer","format":"int32"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}}},"CreateShiftTypeRequestV1":{"type":"object","description":"Тело запроса с данными нового типа","properties":{"code":{"type":"string","description":"Стабильный код","example":"SHIFT_10H","maxLength":32,"minLength":0},"name":{"type":"string","description":"Название для UI","example":"Смена 10 час.","maxLength":255,"minLength":0},"durationHours":{"type":"integer","format":"int32","description":"Длительность в часах","example":10,"minimum":1},"sortOrder":{"type":"integer","format":"int32","description":"Порядок сортировки","example":50,"minimum":0},"active":{"type":"boolean","description":"Активен для выбора","example":true}},"required":["code","durationHours","name"]},"CreateOrderRequestV1":{"type":"object","description":"Модель нового заказа для создания","properties":{"title":{"type":"string","description":"Заголовок заказа","example":"Перевозка песка 10 тонн","maxLength":150,"minLength":5},"description":{"type":"string","description":"Подробное описание груза и требований","maxLength":2000,"minLength":0},"customerId":{"type":"string","format":"uuid","description":"UUID заказчика","example":"7fa85f64-5717-4562-b3fc-2c963f66afa6"},"categoryId":{"type":"string","format":"uuid","description":"UUID категории работ","example":"4fa85f64-5717-4562-b3fc-2c963f66afa6"},"vehicleTypeId":{"type":"string","format":"uuid","description":"UUID типа требуемой спецтехники","example":"2fa85f64-5717-4562-b3fc-2c963f66afa7"},"managerId":{"type":"string","format":"uuid","description":"UUID менеджера","example":"1fa85f64-5717-4562-b3fc-2c963f66afa7"},"companyId":{"type":"string","format":"uuid","description":"UUID компании","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"},"budget":{"type":"number","description":"Предлагаемый бюджет (в рублях)","example":15000.0},"deliveryCost":{"type":"number","description":"Стоимость доставки"},"paymentType":{"type":"string","description":"Предпочитаемый тип оплаты","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"],"example":"card"},"availablePaymentType":{"type":"string","description":"Допустимый тип оплаты","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"],"example":"cash"},"addresses":{"type":"array","description":"Адреса: ровно 1 FEED (подача), опционально 1 DEPARTURE (выезд), 0..10 UNLOAD (выгрузка)","items":{"$ref":"#/components/schemas/OrderAddressRequestV1"},"maxItems":12,"minItems":0},"addressString":{"type":"string","description":"Детальный адрес места проведения работ (legacy, если addresses пуст)","maxLength":500,"minLength":0},"latitude":{"type":"number","format":"double","description":"Широта (legacy)","maximum":90.0,"minimum":-90.0},"longitude":{"type":"number","format":"double","description":"Долгота (legacy)","maximum":180.0,"minimum":-180.0},"city":{"type":"string","description":"Город","maxLength":255,"minLength":0},"startDate":{"type":"string","format":"date-time","description":"Плановая дата начала работ"},"endDate":{"type":"string","format":"date-time","description":"Плановая дата окончания работ"},"details":{"type":"object","additionalProperties":{"type":"object"},"description":"Дополнительные параметры заказа (JSON)"},"vehicleRequirements":{"type":"object","additionalProperties":{"type":"object"},"description":"Дополнительные требования к технике (JSON)"},"photoFileIds":{"type":"array","description":"Идентификаторы файлов фотографий в file-service (0..20); null или [] — без фото; порядок сохраняется","items":{"format":"uuid"},"maxItems":20,"minItems":0},"docFileIds":{"type":"array","description":"Идентификаторы файлов документов в file-service (0..20); null или [] — без документов; порядок сохраняется","items":{"format":"uuid"},"maxItems":20,"minItems":0},"legacyCoordinatesPairValid":{"type":"boolean"}},"required":["customerId","title"]},"InternalOrderSearchRequestV1":{"type":"object","description":"Параметры поиска заказов для AI/MCP","properties":{"query":{"type":"string"},"statuses":{"type":"array","items":{"type":"string","enum":["Canceled","Published","WorkerSelected","WorkerSetOut","InProgress","WaitingPayment","PartiallyPaid","Paid","Done","Deleted"]}},"city":{"type":"string"},"categoryIds":{"type":"array","items":{"type":"string","format":"uuid"}},"includeDeleted":{"type":"boolean"},"createdFrom":{"type":"string","format":"date-time"},"createdTo":{"type":"string","format":"date-time"},"customerId":{"type":"string","format":"uuid"},"workerId":{"type":"string","format":"uuid"},"managerId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"vehicleTypeId":{"type":"string","format":"uuid"},"paymentType":{"type":"string","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"]},"updatedFrom":{"type":"string","format":"date-time"},"updatedTo":{"type":"string","format":"date-time"},"limit":{"type":"integer","format":"int32","maximum":200,"minimum":1},"offset":{"type":"integer","format":"int32","minimum":0}}},"InternalOrderSearchItemResponseV1":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"legacyId":{"type":"integer","format":"int64"},"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["Canceled","Published","WorkerSelected","WorkerSetOut","InProgress","WaitingPayment","PartiallyPaid","Paid","Done","Deleted"]},"customerId":{"type":"string","format":"uuid"},"workerId":{"type":"string","format":"uuid"},"managerId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"categoryId":{"type":"string","format":"uuid"},"vehicleTypeId":{"type":"string","format":"uuid"},"budget":{"type":"number"},"paymentType":{"type":"string","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"]},"deliveryCost":{"type":"number"},"addressString":{"type":"string"},"latitude":{"type":"number","format":"double"},"longitude":{"type":"number","format":"double"},"city":{"type":"string"},"isDeleted":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"InternalOrderSearchResponseV1":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/InternalOrderSearchItemResponseV1"}},"total":{"type":"integer","format":"int64"}}},"CreateOrderShiftRequestV1":{"type":"object","description":"Тело запроса с данными новой смены","properties":{"shiftNumber":{"type":"integer","format":"int32","description":"Порядковый номер смены (1-based); если не задан — следующий свободный","example":2,"minimum":1},"status":{"type":"string","description":"Начальный статус (`PLANNED`, `IN_PROGRESS`, `COMPLETED`, `CANCELLED`)","enum":["PLANNED","IN_PROGRESS","COMPLETED","CANCELLED"],"example":"PLANNED"},"shiftTypeId":{"type":"string","format":"uuid","description":"UUID типа смены из справочника","example":"a1000000-0000-4000-8000-000000000001"},"durationHours":{"type":"integer","format":"int32","description":"Длительность смены в часах (снимок; иначе из типа)","example":8,"minimum":1},"budget":{"type":"number","description":"Бюджет этой смены","example":15000.0,"minimum":0.00},"plannedStart":{"type":"string","format":"date-time","description":"Планируемое начало смены","example":"2026-07-16T09:00:00Z"},"plannedEnd":{"type":"string","format":"date-time","description":"Планируемое окончание смены","example":"2026-07-16T18:00:00Z"},"notes":{"type":"string","description":"Примечание к смене","example":"Первая смена","maxLength":4000,"minLength":0},"metadata":{"type":"object","additionalProperties":{"type":"object"},"description":"Метаданные смены (JSON)"},"plannedRangeValid":{"type":"boolean"}}},"CreateOfferRequestV1":{"type":"object","description":"Создание отклика исполнителя на заказ","properties":{"workerId":{"type":"string","format":"uuid","description":"UUID исполнителя","example":"afa85f64-5717-4562-b3fc-2c963f66afa6"},"vehicleId":{"type":"string","format":"uuid","description":"UUID экземпляра техники (equipment-service)","example":"2fa85f64-5717-4562-b3fc-2c963f66afa6"},"budget":{"type":"number","description":"Предложенный бюджет","example":15000.0},"description":{"type":"string","description":"Описание отклика"},"paymentType":{"type":"string","description":"Тип оплаты","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"]},"deliveryCost":{"type":"number","description":"Стоимость доставки","example":0.0},"startDate":{"type":"string","format":"date-time","description":"Плановая дата начала"},"endDate":{"type":"string","format":"date-time","description":"Плановая дата окончания"}},"required":["vehicleId","workerId"]},"CreateOrderStatusTransitionRequestV1":{"type":"object","description":"Запрос на создание записи о переходе статуса заказа","properties":{"fromStatus":{"type":"string","description":"Статус до перехода (`Published`, `InProgress`, …)","enum":["Canceled","Published","WorkerSelected","WorkerSetOut","InProgress","WaitingPayment","PartiallyPaid","Paid","Done","Deleted"],"example":"Published"},"toStatus":{"type":"string","description":"Статус после перехода (`WorkerSelected`, `Paid`, …)","enum":["Canceled","Published","WorkerSelected","WorkerSetOut","InProgress","WaitingPayment","PartiallyPaid","Paid","Done","Deleted"],"example":"WorkerSelected"},"actorId":{"type":"integer","format":"int64","description":"ID инициатора перехода","example":101},"actorType":{"type":"string","description":"Тип инициатора","enum":["SYSTEM","CUSTOMER","WORKER","MANAGER","ADMIN","INTEGRATION"],"example":"MANAGER"},"reason":{"type":"string","description":"Человекочитаемая причина перехода","maxLength":2000,"minLength":0},"metadata":{"type":"object","additionalProperties":{"type":"object"},"description":"Дополнительные метаданные перехода в формате JSON"}},"required":["toStatus"]},"OrderStatusTransitionResponseV1":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orderId":{"type":"string","format":"uuid"},"fromStatus":{"type":"string","enum":["Canceled","Published","WorkerSelected","WorkerSetOut","InProgress","WaitingPayment","PartiallyPaid","Paid","Done","Deleted"]},"toStatus":{"type":"string","enum":["Canceled","Published","WorkerSelected","WorkerSetOut","InProgress","WaitingPayment","PartiallyPaid","Paid","Done","Deleted"]},"actorId":{"type":"integer","format":"int64"},"actorType":{"type":"string","enum":["SYSTEM","CUSTOMER","WORKER","MANAGER","ADMIN","INTEGRATION"]},"reason":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}}},"CreateOrderCancellationRequestV1":{"type":"object","description":"Запрос на фиксацию отмены заказа","properties":{"cancelledById":{"type":"integer","format":"int64","description":"ID инициатора отмены","example":1042},"cancelledByType":{"type":"string","description":"Тип инициатора отмены","enum":["SYSTEM","CUSTOMER","WORKER","MANAGER","ADMIN","INTEGRATION"],"example":"CUSTOMER"},"cancellationReasonCode":{"type":"string","description":"Код причины отмены","example":"NO_LONGER_NEEDED","maxLength":64,"minLength":0},"cancellationReasonText":{"type":"string","description":"Подробное описание причины отмены","maxLength":2000,"minLength":0},"refundRequired":{"type":"boolean","description":"Требуется ли возврат средств","example":true},"feeAmount":{"type":"number","description":"Комиссия/штраф при отмене","example":500.0,"minimum":0.0},"currency":{"type":"string","description":"Валюта комиссии","example":"RUB","maxLength":3,"minLength":3},"cancelledAt":{"type":"string","format":"date-time","description":"Дата/время отмены"},"metadata":{"type":"object","additionalProperties":{"type":"object"},"description":"Метаданные отмены в формате JSON"}},"required":["cancellationReasonCode","cancelledByType"]},"OrderCancellationResponseV1":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"orderId":{"type":"string","format":"uuid"},"cancelledById":{"type":"integer","format":"int64"},"cancelledByType":{"type":"string","enum":["SYSTEM","CUSTOMER","WORKER","MANAGER","ADMIN","INTEGRATION"]},"cancellationReasonCode":{"type":"string"},"cancellationReasonText":{"type":"string"},"refundRequired":{"type":"boolean"},"feeAmount":{"type":"number"},"currency":{"type":"string"},"cancelledAt":{"type":"string","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"object"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}}},"UpdateOrderShiftStatusRequestV1":{"type":"object","description":"Тело запроса со сменой статуса","properties":{"status":{"type":"string","description":"Целевой статус (`PLANNED`, `IN_PROGRESS`, `COMPLETED`, `CANCELLED`)","enum":["PLANNED","IN_PROGRESS","COMPLETED","CANCELLED"],"example":"COMPLETED"},"actualStart":{"type":"string","format":"date-time","description":"Фактическое начало смены","example":"2026-07-16T09:15:00Z"},"actualEnd":{"type":"string","format":"date-time","description":"Фактическое окончание смены","example":"2026-07-16T17:45:00Z"},"actualRangeValid":{"type":"boolean"}},"required":["status"]},"PartialUpdateOrderRequestV1":{"type":"object","description":"Тело запроса с обновляемыми данными заказа","properties":{"title":{"type":"string","description":"Новый заголовок заказа","maxLength":150,"minLength":5},"description":{"type":"string","description":"Новое подробное описание","maxLength":2000,"minLength":0},"budget":{"type":"number","description":"Новый бюджет","minimum":0.0},"categoryId":{"type":"string","format":"uuid","description":"UUID категории работ","example":"4fa85f64-5717-4562-b3fc-2c963f66afa6"},"vehicleTypeId":{"type":"string","format":"uuid","description":"UUID типа требуемой спецтехники","example":"2fa85f64-5717-4562-b3fc-2c963f66afa7"},"managerId":{"type":"string","format":"uuid"},"companyId":{"type":"string","format":"uuid"},"deliveryCost":{"type":"number","minimum":0.0},"paymentType":{"type":"string","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"]},"availablePaymentType":{"type":"string","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"]},"addresses":{"type":"array","description":"Адреса: ровно 1 FEED, опционально 1 DEPARTURE, 0..10 UNLOAD (замена; null — не менять)","items":{"$ref":"#/components/schemas/OrderAddressRequestV1"},"maxItems":12,"minItems":0},"city":{"type":"string","description":"Город","maxLength":255,"minLength":0},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"details":{"type":"object","additionalProperties":{"type":"object"}},"vehicleRequirements":{"type":"object","additionalProperties":{"type":"object"}},"photoFileIds":{"type":"array","description":"Идентификаторы файлов фотографий (0..20); null — не менять, [] — очистить","items":{"format":"uuid"},"maxItems":20,"minItems":0},"docFileIds":{"type":"array","description":"Идентификаторы файлов документов (0..20); null — не менять, [] — очистить","items":{"format":"uuid"},"maxItems":20,"minItems":0}}},"UpdateOrderAssignmentStatusRequestV1":{"type":"object","description":"Запрос на обновление статуса назначения исполнителя","properties":{"assignmentStatus":{"type":"string","description":"Новый статус назначения","enum":["ACTIVE","ACCEPTED","EXPIRED","CANCELLED"],"example":"ACCEPTED"},"acceptedAt":{"type":"string","format":"date-time","description":"Дата/время принятия назначения исполнителем"}},"required":["assignmentStatus"]},"PartialUpdateOfferRequestV1":{"type":"object","description":"Частичное обновление отклика","properties":{"budget":{"type":"number","description":"Предложенный бюджет"},"description":{"type":"string","description":"Описание отклика"},"paymentType":{"type":"string","description":"Тип оплаты","enum":["bn","cash","bnnds","qrnspk","agreement","Безналичный","card","sber-pay","googlepay","почасовая","bn,bnnds,cash","factoring","удобный компании","deposit","all","yandex-pay"]},"deliveryCost":{"type":"number","description":"Стоимость доставки"}}},"PagedResponseOrderResponseV1":{"type":"object","description":"Постраничный ответ со списком элементов","properties":{"content":{"type":"array","description":"Элементы текущей страницы","items":{"$ref":"#/components/schemas/OrderResponseV1"}},"currentPage":{"type":"integer","format":"int32","description":"Номер текущей страницы (с 1)","example":1},"pageSize":{"type":"integer","format":"int32","description":"Размер страницы","example":20},"totalElements":{"type":"integer","format":"int64","description":"Общее количество элементов","example":100}}},"OrderPhotoResponseV1":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fileId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}}},"OrderDocResponseV1":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"fileId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"}}},"InternalOrderContextResponseV1":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"canonicalText":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"object"}}}},"PagedResponseOrderStatusTransitionResponseV1":{"type":"object","description":"Постраничный ответ со списком элементов","properties":{"content":{"type":"array","description":"Элементы текущей страницы","items":{"$ref":"#/components/schemas/OrderStatusTransitionResponseV1"}},"currentPage":{"type":"integer","format":"int32","description":"Номер текущей страницы (с 1)","example":1},"pageSize":{"type":"integer","format":"int32","description":"Размер страницы","example":20},"totalElements":{"type":"integer","format":"int64","description":"Общее количество элементов","example":100}}},"PagedResponseOfferResponseV1":{"type":"object","description":"Постраничный ответ со списком элементов","properties":{"content":{"type":"array","description":"Элементы текущей страницы","items":{"$ref":"#/components/schemas/OfferResponseV1"}},"currentPage":{"type":"integer","format":"int32","description":"Номер текущей страницы (с 1)","example":1},"pageSize":{"type":"integer","format":"int32","description":"Размер страницы","example":20},"totalElements":{"type":"integer","format":"int64","description":"Общее количество элементов","example":100}}}},"securitySchemes":{"bearerAuth":{"type":"http","description":"JWT access token identity-service.\nВ Swagger UI вставьте только значение токена (префикс Bearer подставляется автоматически).\nРоли: claim realm_access.roles (MANAGER, ADMIN, SUPERADMIN, OPERATOR, WORKER, INTEGRATION, SERVICE).\n","scheme":"bearer","bearerFormat":"JWT"}}}}