{
  "openapi": "3.1.1",
  "info": {
    "title": "api/loads/search",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "/"
    },
    {
      "url": "https://api.ati.su"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/gw/search_loads/integration/v1/loads/search/by-boards": {
      "get": {
        "tags": [
          "SearchLoadsByBoardsIntegration"
        ],
        "summary": "Возвращает страницу грузов с закрытых площадок контакта в модели вебхука cargoes.on_boards.",
        "description": "API для интеграции. Ищет грузы на закрытых площадках, к которым у контакта есть доступ; Биржа ATI.SU в поиск не входит. Авторизация — токен API ATI.SU: https://ati.su/developers/auth/auth/. Порядок выдачи: сначала грузы только с закрытых площадок, затем по added_at от новых к старым. Запрос с skip = 0 ищет заново и запоминает выдачу на 15 минут; запросы с skip > 0 листают запомненную выдачу. Груз, снятый с площадок между запросами, из страницы выпадает, поэтому страница бывает короче take. skip + take — не больше 10 000: дальше выдачу сужают через updated_since или board_ids. Модель груза основана на вебхуке cargoes.on_boards. Отличия: даты погрузки и разгрузки — YYYY-MM-DD, у промежуточных точек нет organization; поля со значением null не пишутся.",
        "parameters": [
          {
            "name": "board_ids",
            "in": "query",
            "description": "Id закрытых площадок контакта, 24 шестнадцатеричных символа. Параметр повторяется: board_ids=644bdc87dbd6fc3747887c7b&board_ids=644bdc87dbd6fc3747887c7c. Не передан или пустой — поиск по всем закрытым площадкам контакта. В /v1.0/loads/search/byboards параметр назывался boardIds; неизвестные параметры метод не проверяет, а пропускает. Остальные параметры передаются один раз",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "example": [
              "644bdc87dbd6fc3747887c7b"
            ]
          },
          {
            "name": "updated_since",
            "in": "query",
            "description": "Отбирает грузы с updated_at не раньше этого момента. ISO 8601 с часовым поясом, например 2026-09-28T07:00:00.000Z. Смещение передавайте с экранированным плюсом (%2B03:00): неэкранированный «+» в query string читается как пробел. Время без часового пояса метод отклоняет с ошибкой 400",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-09-28T07:00:00.000Z"
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Сколько грузов выдачи пропустить, от 0. По умолчанию 0. skip + take — не больше 10 000: дальше выдачу сужают через updated_since или board_ids",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            },
            "example": 0
          },
          {
            "name": "take",
            "in": "query",
            "description": "Сколько грузов вернуть, от 1 до 100. По умолчанию 100",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            },
            "example": 100
          }
        ],
        "responses": {
          "200": {
            "description": "Страница грузов и общее число грузов в выдаче.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchLoadsByBoardsIntegrationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Некорректный или повторённый параметр запроса — ошибка validation_errors. Коды по параметрам: invalid_board_id, invalid_skip, invalid_take, skip_too_deep, invalid_updated_since, duplicate_query_parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorIntegrationResponse"
                }
              }
            }
          },
          "403": {
            "description": "search_forbidden или access_denied — фирма заблокирована; boards_access_denied — в board_ids есть Биржа ATI.SU или площадка, недоступная контакту.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorIntegrationResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "AuthenticatedUserId": []
          },
          {
            "ClientName": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "SearchLoadsByBoardsIntegrationResponse": {
        "required": [
          "cargos",
          "total"
        ],
        "type": "object",
        "properties": {
          "cargos": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/BoardCargoResponse"
            },
            "description": "Грузы страницы в модели вебхука cargoes.on_boards",
            "example": [
              {
                "cargo_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "cargo_number": "ABC1234",
                "added_at": "2026-09-28T07:00:00.123+00:00",
                "updated_at": "2026-09-28T09:15:30.25+00:00",
                "refreshed_at": "2026-09-28T10:00:00+00:00",
                "persistent_user_id": 1234567,
                "ati_id": 1234567,
                "route": {
                  "loading": {
                    "city_id": 3611,
                    "address": "ул. Ленина, д. 10",
                    "near_cities": [
                      3612,
                      3613
                    ]
                  },
                  "unloading": {
                    "city_id": 1,
                    "address": "ул. Ленина, д. 10",
                    "near_cities": [
                      2,
                      3
                    ]
                  },
                  "is_round_trip": false
                },
                "truck": {
                  "trucks_count": 1,
                  "load_type": "ftl",
                  "body_types": [
                    200,
                    100
                  ],
                  "body_loading": {
                    "types": [
                      1,
                      4
                    ],
                    "is_all_required": false
                  },
                  "body_unloading": {
                    "types": [
                      1,
                      4
                    ],
                    "is_all_required": false
                  },
                  "temperature": {
                    "from": -18,
                    "to": -15
                  },
                  "documents": {
                    "tir": false,
                    "cmr": true,
                    "t1": false,
                    "medical_card": false
                  },
                  "requirements": {
                    "logging_truck": false,
                    "road_train": false,
                    "air_suspension": false,
                    "team_driving": false
                  },
                  "adr": 3,
                  "belts_count": 4,
                  "is_tracking": true,
                  "required_capacity": 20
                },
                "payment": {
                  "type": "auction",
                  "auction_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                  "direct_offer": false
                },
                "documents": [
                  {
                    "id": "644bdc87dbd6fc3747887c7b",
                    "name": "ТТН",
                    "link": "https://files.example.com/documents/ttn.pdf"
                  }
                ],
                "boards": [
                  {
                    "id": "644bdc87dbd6fc3747887c7b",
                    "reservation_enabled": true
                  }
                ],
                "note": "Нужен гидроборт",
                "contacts": [
                  12,
                  15
                ],
                "distance": 715,
                "offer_count": 3
              }
            ]
          },
          "total": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Число грузов во всей выдаче, а не на странице",
            "format": "int32",
            "example": 154
          }
        },
        "description": "Страница выдачи поиска грузов по закрытым площадкам"
      },
      "ErrorIntegrationResponse": {
        "required": [
          "error",
          "reason"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": [
              "null",
              "string"
            ],
            "description": "Код ошибки: validation_errors, unauthorized, search_forbidden, access_denied, boards_access_denied, unknown_server_error",
            "example": "validation_errors"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ],
            "description": "Описание ошибки для человека",
            "example": "Некорректные параметры запроса"
          },
          "error_list": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/ErrorItemIntegrationResponse"
            },
            "description": "Ошибки по отдельным параметрам запроса. Есть только у ошибки validation_errors",
            "example": [
              {
                "error": "invalid_take",
                "reason": "take должен быть от 1 до 100"
              }
            ]
          },
          "details": {
            "description": "Подробности ошибки. Есть только у ошибки boards_access_denied",
            "$ref": "#/components/schemas/ErrorDetailsIntegrationResponse"
          }
        },
        "description": "Ошибка интеграторского метода: код, описание и при необходимости список ошибок по параметрам или подробности"
      },
      "BoardCargoResponse": {
        "required": [
          "cargo_id",
          "cargo_number",
          "added_at",
          "updated_at",
          "refreshed_at",
          "persistent_user_id",
          "route",
          "truck",
          "payment",
          "boards",
          "contacts",
          "distance"
        ],
        "type": "object",
        "properties": {
          "cargo_id": {
            "type": "string",
            "description": "Id груза",
            "format": "uuid",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "cargo_number": {
            "type": [
              "null",
              "string"
            ],
            "description": "Номер груза, который присваивает ATI.SU",
            "example": "ABC1234"
          },
          "added_at": {
            "type": "string",
            "description": "Время добавления груза, UTC",
            "format": "date-time",
            "example": "2026-09-28T07:00:00.123+00:00"
          },
          "updated_at": {
            "type": "string",
            "description": "Время последнего изменения груза, UTC",
            "format": "date-time",
            "example": "2026-09-28T09:15:30.25+00:00"
          },
          "refreshed_at": {
            "type": "string",
            "description": "Время последнего поднятия груза, UTC",
            "format": "date-time",
            "example": "2026-09-28T10:00:00+00:00"
          },
          "persistent_user_id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Id фирмы-владельца груза",
            "format": "int32",
            "example": 1234567
          },
          "ati_id": {
            "type": [
              "null",
              "string"
            ],
            "description": "Код АТИ фирмы-владельца груза. Поля нет, если код временно недоступен",
            "example": 1234567
          },
          "route": {
            "description": "Маршрут",
            "$ref": "#/components/schemas/RouteResponse"
          },
          "truck": {
            "description": "Требования к транспорту",
            "$ref": "#/components/schemas/TruckResponse"
          },
          "payment": {
            "description": "Условия оплаты",
            "$ref": "#/components/schemas/PaymentResponse"
          },
          "documents": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/DocumentResponse"
            },
            "description": "Фото груза и документы",
            "example": [
              {
                "id": "644bdc87dbd6fc3747887c7b",
                "name": "ТТН",
                "link": "https://files.example.com/documents/ttn.pdf"
              }
            ]
          },
          "boards": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/BoardPlacementResponse"
            },
            "description": "Опубликованные размещения груза на площадках из запроса, видимые фирме. На площадке, где участники видят только свои грузы, фирма видит только размещения своих грузов",
            "example": [
              {
                "id": "644bdc87dbd6fc3747887c7b",
                "reservation_enabled": true
              }
            ]
          },
          "note": {
            "type": [
              "null",
              "string"
            ],
            "description": "Примечание к грузу",
            "example": "Нужен гидроборт"
          },
          "contacts": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            },
            "description": "Id контактов фирмы-владельца, указанных в грузе",
            "example": [
              12,
              15
            ]
          },
          "distance": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Расстояние маршрута, км. 0, если маршрут ещё не посчитан",
            "format": "int32",
            "example": 715
          },
          "offer_count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "Число встречных предложений. Перевозчик видит его на сайте как «Предложений: N». Поля нет, если счётчик временно недоступен",
            "format": "int32",
            "example": 3
          }
        },
        "description": "Груз на закрытой площадке. Основан на модели вебхука cargoes.on_boards и добавляет поля, которые перевозчик видит на сайте: refreshed_at, offer_count, name_id груза, team_driving"
      },
      "ErrorItemIntegrationResponse": {
        "required": [
          "error",
          "reason"
        ],
        "type": "object",
        "properties": {
          "error": {
            "type": [
              "null",
              "string"
            ],
            "description": "Код ошибки",
            "example": "invalid_take"
          },
          "reason": {
            "type": [
              "null",
              "string"
            ],
            "description": "Описание ошибки для человека",
            "example": "take должен быть от 1 до 100"
          }
        },
        "description": "Ошибка по отдельному параметру запроса"
      },
      "ErrorDetailsIntegrationResponse": {
        "type": "object",
        "properties": {
          "board_ids": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            },
            "description": "Id площадок из запроса, к которым у контакта нет доступа: Биржа ATI.SU или чужие закрытые площадки",
            "example": [
              "a0a0a0a0a0a0a0a0a0a0a0a0"
            ]
          }
        },
        "description": "Подробности ошибки интеграторского метода"
      },
      "RouteResponse": {
        "required": [
          "loading",
          "unloading",
          "way_points",
          "is_round_trip"
        ],
        "type": "object",
        "properties": {
          "loading": {
            "description": "Погрузка",
            "$ref": "#/components/schemas/PrimaryLoadingPointResponse"
          },
          "unloading": {
            "description": "Разгрузка",
            "$ref": "#/components/schemas/PrimaryUnloadingPointResponse"
          },
          "way_points": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/WayPointResponse"
            },
            "description": "Промежуточные точки в порядке следования",
            "example": [
              {
                "type": "loading",
                "loading_date": {
                  "first_date": "2026-09-28",
                  "last_date": "2026-09-30"
                },
                "city_id": 3611,
                "address": "ул. Ленина, д. 10",
                "coordinates": {
                  "longitude": 37.6173,
                  "latitude": 55.7558
                },
                "catalogs_organization": {
                  "name": "ООО Транспорт",
                  "ownership": 3
                }
              }
            ]
          },
          "is_round_trip": {
            "type": "boolean",
            "description": "Кругорейс",
            "example": false
          }
        },
        "description": "Маршрут"
      },
      "TruckResponse": {
        "required": [
          "trucks_count",
          "load_type",
          "body_types",
          "is_tracking"
        ],
        "type": "object",
        "properties": {
          "trucks_count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Сколько машин нужно",
            "format": "int32",
            "example": 1
          },
          "load_type": {
            "type": [
              "null",
              "string"
            ],
            "description": "Загрузка: ftl — отдельной машиной, dont-care — не важно",
            "example": "ftl"
          },
          "body_types": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            },
            "description": "Типы кузова. dict: GET /v1.0/dictionaries/carTypes → TypeId",
            "example": [
              200,
              100
            ]
          },
          "body_loading": {
            "description": "Способы погрузки",
            "$ref": "#/components/schemas/TruckLoadTypeResponse"
          },
          "body_unloading": {
            "description": "Способы разгрузки",
            "$ref": "#/components/schemas/TruckLoadTypeResponse"
          },
          "temperature": {
            "description": "Температурный режим",
            "$ref": "#/components/schemas/TemperatureResponse"
          },
          "documents": {
            "description": "Разрешения",
            "$ref": "#/components/schemas/TruckDocumentsResponse"
          },
          "requirements": {
            "description": "Требования к машине",
            "$ref": "#/components/schemas/TruckRequirementsResponse"
          },
          "adr": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "Класс опасности груза ADR",
            "format": "int32",
            "example": 3
          },
          "belts_count": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "Сколько нужно ремней",
            "format": "int32",
            "example": 4
          },
          "is_tracking": {
            "type": "boolean",
            "description": "Нужен трекинг через АТИ Водитель",
            "example": true
          },
          "required_capacity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "Требуемая грузоподъёмность, т",
            "format": "double",
            "example": 20
          }
        },
        "description": "Требования к транспорту"
      },
      "PaymentResponse": {
        "required": [
          "type"
        ],
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/PaymentResponseAuctionPaymentResponse"
          },
          {
            "$ref": "#/components/schemas/PaymentResponseRateRequestPaymentResponse"
          },
          {
            "$ref": "#/components/schemas/PaymentResponseWithBargainingPaymentResponse"
          },
          {
            "$ref": "#/components/schemas/PaymentResponseWithoutBargainingPaymentResponse"
          }
        ],
        "description": "Условия оплаты. Тип в поле type: with-bargaining — ставка с торгом, without-bargaining — ставка без торга, rate-request — запрос ставки, auction — торги",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "auction": "#/components/schemas/PaymentResponseAuctionPaymentResponse",
            "rate-request": "#/components/schemas/PaymentResponseRateRequestPaymentResponse",
            "with-bargaining": "#/components/schemas/PaymentResponseWithBargainingPaymentResponse",
            "without-bargaining": "#/components/schemas/PaymentResponseWithoutBargainingPaymentResponse"
          }
        }
      },
      "DocumentResponse": {
        "required": [
          "id",
          "name",
          "link"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ],
            "description": "Id файла",
            "example": "644bdc87dbd6fc3747887c7b"
          },
          "name": {
            "type": [
              "null",
              "string"
            ],
            "description": "Название",
            "example": "ТТН"
          },
          "link": {
            "type": [
              "null",
              "string"
            ],
            "description": "Ссылка на файл",
            "example": "https://files.example.com/documents/ttn.pdf"
          }
        },
        "description": "Фото груза или документ"
      },
      "BoardPlacementResponse": {
        "required": [
          "id",
          "reservation_enabled"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ],
            "description": "Id площадки",
            "example": "644bdc87dbd6fc3747887c7b"
          },
          "reservation_enabled": {
            "type": "boolean",
            "description": "Перевозчики могут забронировать груз",
            "example": true
          }
        },
        "description": "Размещение груза на площадке"
      },
      "PrimaryLoadingPointResponse": {
        "required": [
          "city_id",
          "dates",
          "cargos"
        ],
        "type": "object",
        "properties": {
          "city_id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Id населённого пункта. dict: POST /gw/gis-dict/v1/cities/by-ids → city_id",
            "format": "int32",
            "example": 3611
          },
          "address": {
            "type": [
              "null",
              "string"
            ],
            "description": "Адрес в населённом пункте",
            "example": "ул. Ленина, д. 10"
          },
          "coordinates": {
            "description": "Координаты адреса",
            "$ref": "#/components/schemas/CoordinatesResponse"
          },
          "organization": {
            "description": "Организация из справочника, если в точке указана организация",
            "$ref": "#/components/schemas/CatalogsOrganizationResponse"
          },
          "near_cities": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            },
            "description": "Id ближайших крупных населённых пунктов. dict: POST /gw/gis-dict/v1/cities/by-ids → city_id",
            "example": [
              3612,
              3613
            ]
          },
          "dates": {
            "description": "Даты погрузки",
            "$ref": "#/components/schemas/LoadingDatesResponse"
          },
          "cargos": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/LoadingCargoResponse"
            },
            "description": "Грузы на погрузку",
            "example": [
              {
                "name_id": 112,
                "name": "Трубы",
                "packaging": {
                  "type": 2,
                  "quantity": 20
                },
                "cargo_id": 1,
                "weight": {
                  "type": "tons",
                  "quantity": 20
                },
                "volume": {
                  "quantity": 82
                },
                "sizes": {
                  "length": {
                    "value": 13.6,
                    "is_highlighted": false
                  },
                  "height": {
                    "value": 13.6,
                    "is_highlighted": false
                  },
                  "width": {
                    "value": 13.6,
                    "is_highlighted": false
                  },
                  "diameter": 1.2
                }
              }
            ]
          }
        },
        "description": "Погрузка"
      },
      "PrimaryUnloadingPointResponse": {
        "required": [
          "city_id"
        ],
        "type": "object",
        "properties": {
          "city_id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Id населённого пункта. dict: POST /gw/gis-dict/v1/cities/by-ids → city_id",
            "format": "int32",
            "example": 1
          },
          "address": {
            "type": [
              "null",
              "string"
            ],
            "description": "Адрес в населённом пункте",
            "example": "ул. Ленина, д. 10"
          },
          "coordinates": {
            "description": "Координаты адреса",
            "$ref": "#/components/schemas/CoordinatesResponse"
          },
          "organization": {
            "description": "Организация из справочника, если в точке указана организация",
            "$ref": "#/components/schemas/CatalogsOrganizationResponse"
          },
          "near_cities": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            },
            "description": "Id ближайших крупных населённых пунктов. dict: POST /gw/gis-dict/v1/cities/by-ids → city_id",
            "example": [
              2,
              3
            ]
          },
          "dates": {
            "description": "Даты разгрузки. Поля нет, если даты и время разгрузки не указаны",
            "$ref": "#/components/schemas/UnloadingDatesResponse"
          }
        },
        "description": "Разгрузка"
      },
      "WayPointResponse": {
        "required": [
          "type"
        ],
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/WayPointResponseLoadingWayPointResponse"
          },
          {
            "$ref": "#/components/schemas/WayPointResponseUnloadingWayPointResponse"
          },
          {
            "$ref": "#/components/schemas/WayPointResponseCustomsWayPointResponse"
          },
          {
            "$ref": "#/components/schemas/WayPointResponseGoThroughWayPointResponse"
          }
        ],
        "description": "Промежуточная точка маршрута. Тип в поле type: loading — погрузка, unloading — разгрузка, customs — таможня, go-through — ехать через",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "loading": "#/components/schemas/WayPointResponseLoadingWayPointResponse",
            "unloading": "#/components/schemas/WayPointResponseUnloadingWayPointResponse",
            "customs": "#/components/schemas/WayPointResponseCustomsWayPointResponse",
            "go-through": "#/components/schemas/WayPointResponseGoThroughWayPointResponse"
          }
        }
      },
      "TruckLoadTypeResponse": {
        "required": [
          "types",
          "is_all_required"
        ],
        "type": "object",
        "properties": {
          "types": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            },
            "description": "Id способов. dict: GET /v1.0/dictionaries/loadingTypes → Id",
            "example": [
              1,
              4
            ]
          },
          "is_all_required": {
            "type": "boolean",
            "description": "Нужны все перечисленные способы, а не любой из них",
            "example": false
          }
        },
        "description": "Способы погрузки или разгрузки"
      },
      "TemperatureResponse": {
        "type": "object",
        "properties": {
          "from": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "Нижняя граница",
            "format": "int32",
            "example": -18
          },
          "to": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "Верхняя граница",
            "format": "int32",
            "example": -15
          }
        },
        "description": "Температурный режим, °C"
      },
      "TruckDocumentsResponse": {
        "required": [
          "tir",
          "cmr",
          "t1",
          "medical_card"
        ],
        "type": "object",
        "properties": {
          "tir": {
            "type": "boolean",
            "description": "Нужна книжка TIR",
            "example": false
          },
          "cmr": {
            "type": "boolean",
            "description": "Нужна накладная CMR",
            "example": true
          },
          "t1": {
            "type": "boolean",
            "description": "Нужна декларация T1",
            "example": false
          },
          "medical_card": {
            "type": "boolean",
            "description": "Нужна медкнижка",
            "example": false
          }
        },
        "description": "Разрешения"
      },
      "TruckRequirementsResponse": {
        "required": [
          "logging_truck",
          "road_train",
          "air_suspension",
          "team_driving"
        ],
        "type": "object",
        "properties": {
          "logging_truck": {
            "type": "boolean",
            "description": "Нужны коники",
            "example": false
          },
          "road_train": {
            "type": "boolean",
            "description": "Нужна сцепка",
            "example": false
          },
          "air_suspension": {
            "type": "boolean",
            "description": "Нужен пневмоход",
            "example": false
          },
          "team_driving": {
            "type": "boolean",
            "description": "Нужен экипаж — два водителя",
            "example": false
          }
        },
        "description": "Требования к машине"
      },
      "PaymentResponseAuctionPaymentResponse": {
        "required": [
          "auction_id",
          "direct_offer"
        ],
        "properties": {
          "type": {
            "enum": [
              "auction"
            ],
            "type": "string",
            "description": "Условия оплаты. Тип в поле type: with-bargaining — ставка с торгом, without-bargaining — ставка без торга, rate-request — запрос ставки, auction — торги",
            "example": "auction"
          },
          "auction_id": {
            "type": "string",
            "description": "Id торгов",
            "format": "uuid",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "direct_offer": {
            "type": "boolean",
            "description": "Прямой договор с грузовладельцем",
            "example": false
          },
          "prepayment": {
            "description": "Предоплата",
            "$ref": "#/components/schemas/PrepaymentResponse"
          },
          "payment_mode": {
            "description": "Момент оплаты",
            "$ref": "#/components/schemas/PaymentModeResponse"
          }
        },
        "description": "Торги"
      },
      "PaymentResponseRateRequestPaymentResponse": {
        "required": [
          "rate_with_vat_available",
          "rate_without_vat_available",
          "cash_available",
          "direct_offer"
        ],
        "properties": {
          "type": {
            "enum": [
              "rate-request"
            ],
            "type": "string",
            "description": "Условия оплаты. Тип в поле type: with-bargaining — ставка с торгом, without-bargaining — ставка без торга, rate-request — запрос ставки, auction — торги",
            "example": "rate-request"
          },
          "rate_with_vat_available": {
            "type": "boolean",
            "description": "Можно предлагать ставку безнал с НДС",
            "example": true
          },
          "rate_without_vat_available": {
            "type": "boolean",
            "description": "Можно предлагать ставку безнал без НДС",
            "example": true
          },
          "cash_available": {
            "type": "boolean",
            "description": "Можно предлагать ставку наличными",
            "example": false
          },
          "direct_offer": {
            "type": "boolean",
            "description": "Прямой договор с грузовладельцем",
            "example": false
          },
          "prepayment": {
            "description": "Предоплата",
            "$ref": "#/components/schemas/PrepaymentResponse"
          },
          "payment_mode": {
            "description": "Момент оплаты",
            "$ref": "#/components/schemas/PaymentModeResponse"
          }
        },
        "description": "Запрос ставки"
      },
      "PaymentResponseWithBargainingPaymentResponse": {
        "required": [
          "currency_type",
          "on_card",
          "direct_offer"
        ],
        "properties": {
          "type": {
            "enum": [
              "with-bargaining"
            ],
            "type": "string",
            "description": "Условия оплаты. Тип в поле type: with-bargaining — ставка с торгом, without-bargaining — ставка без торга, rate-request — запрос ставки, auction — торги",
            "example": "with-bargaining"
          },
          "currency_type": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Id валюты ставок. dict: GET /v1.0/dictionaries/currencyTypes → Id",
            "format": "int32",
            "example": 1
          },
          "rate_with_vat": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "Ставка безнал с НДС",
            "format": "double",
            "example": 50000
          },
          "rate_without_vat": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "Ставка безнал без НДС",
            "format": "double",
            "example": 45000
          },
          "cash": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "Ставка наличными",
            "format": "double",
            "example": 43000
          },
          "on_card": {
            "type": "boolean",
            "description": "Наличные можно перевести на карту",
            "example": true
          },
          "direct_offer": {
            "type": "boolean",
            "description": "Прямой договор с грузовладельцем",
            "example": false
          },
          "prepayment": {
            "description": "Предоплата",
            "$ref": "#/components/schemas/PrepaymentResponse"
          },
          "payment_mode": {
            "description": "Момент оплаты",
            "$ref": "#/components/schemas/PaymentModeResponse"
          }
        },
        "description": "Ставка с торгом"
      },
      "PaymentResponseWithoutBargainingPaymentResponse": {
        "required": [
          "currency_type",
          "on_card",
          "direct_offer"
        ],
        "properties": {
          "type": {
            "enum": [
              "without-bargaining"
            ],
            "type": "string",
            "description": "Условия оплаты. Тип в поле type: with-bargaining — ставка с торгом, without-bargaining — ставка без торга, rate-request — запрос ставки, auction — торги",
            "example": "without-bargaining"
          },
          "currency_type": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Id валюты ставок. dict: GET /v1.0/dictionaries/currencyTypes → Id",
            "format": "int32",
            "example": 1
          },
          "rate_with_vat": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "Ставка безнал с НДС",
            "format": "double",
            "example": 50000
          },
          "rate_without_vat": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "Ставка безнал без НДС",
            "format": "double",
            "example": 45000
          },
          "cash": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "Ставка наличными",
            "format": "double",
            "example": 43000
          },
          "on_card": {
            "type": "boolean",
            "description": "Наличные можно перевести на карту",
            "example": true
          },
          "direct_offer": {
            "type": "boolean",
            "description": "Прямой договор с грузовладельцем",
            "example": false
          },
          "prepayment": {
            "description": "Предоплата",
            "$ref": "#/components/schemas/PrepaymentResponse"
          },
          "payment_mode": {
            "description": "Момент оплаты",
            "$ref": "#/components/schemas/PaymentModeResponse"
          }
        },
        "description": "Ставка без торга"
      },
      "CoordinatesResponse": {
        "required": [
          "longitude",
          "latitude"
        ],
        "type": "object",
        "properties": {
          "longitude": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "Долгота",
            "format": "double",
            "example": 37.6173
          },
          "latitude": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "Широта",
            "format": "double",
            "example": 55.7558
          }
        },
        "description": "Координаты"
      },
      "CatalogsOrganizationResponse": {
        "required": [
          "name",
          "ownership"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ],
            "description": "Название организации",
            "example": "ООО Транспорт"
          },
          "ownership": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Id организационно-правовой формы. dict: GET /v1.0/dictionaries/ownerships → Id",
            "format": "int32",
            "example": 3
          }
        },
        "description": "Организация из справочника"
      },
      "LoadingDatesResponse": {
        "required": [
          "type"
        ],
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/LoadingDatesResponseReadyLoadingDatesResponse"
          },
          {
            "$ref": "#/components/schemas/LoadingDatesResponseFromDateLoadingDatesResponse"
          },
          {
            "$ref": "#/components/schemas/LoadingDatesResponsePermanentLoadingDatesResponse"
          },
          {
            "$ref": "#/components/schemas/LoadingDatesResponseRateRequestLoadingDatesResponse"
          }
        ],
        "description": "Даты погрузки. Тип в поле type: ready — готов к погрузке, from-date — с указанной даты, permanent — постоянный груз, rate-request — запрос ставки, груза ещё нет",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "ready": "#/components/schemas/LoadingDatesResponseReadyLoadingDatesResponse",
            "from-date": "#/components/schemas/LoadingDatesResponseFromDateLoadingDatesResponse",
            "permanent": "#/components/schemas/LoadingDatesResponsePermanentLoadingDatesResponse",
            "rate-request": "#/components/schemas/LoadingDatesResponseRateRequestLoadingDatesResponse"
          }
        }
      },
      "LoadingCargoResponse": {
        "required": [
          "name_id",
          "name",
          "cargo_id"
        ],
        "type": "object",
        "properties": {
          "name_id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Id наименования груза. dict: GET /v1.0/dictionaries/cargoTypes → Id",
            "format": "int32",
            "example": 112
          },
          "name": {
            "type": [
              "null",
              "string"
            ],
            "description": "Наименование груза",
            "example": "Трубы"
          },
          "packaging": {
            "description": "Упаковка",
            "$ref": "#/components/schemas/PackagingResponse"
          },
          "cargo_id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Порядковый номер груза внутри заявки",
            "format": "int32",
            "example": 1
          },
          "weight": {
            "description": "Вес",
            "$ref": "#/components/schemas/WeightResponse"
          },
          "volume": {
            "description": "Объём",
            "$ref": "#/components/schemas/VolumeResponse"
          },
          "sizes": {
            "description": "Габариты",
            "$ref": "#/components/schemas/SizesResponse"
          }
        },
        "description": "Груз в точке погрузки"
      },
      "UnloadingDatesResponse": {
        "type": "object",
        "properties": {
          "first_date": {
            "type": [
              "null",
              "string"
            ],
            "description": "Первый день разгрузки, календарная дата в формате YYYY-MM-DD",
            "format": "date",
            "example": "2026-09-28"
          },
          "last_date": {
            "type": [
              "null",
              "string"
            ],
            "description": "Последний день разгрузки, календарная дата в формате YYYY-MM-DD",
            "format": "date",
            "example": "2026-09-30"
          },
          "time": {
            "description": "Время разгрузки",
            "$ref": "#/components/schemas/LoadingTimeResponse"
          }
        },
        "description": "Даты разгрузки"
      },
      "WayPointResponseLoadingWayPointResponse": {
        "required": [
          "cargos",
          "city_id"
        ],
        "properties": {
          "type": {
            "enum": [
              "loading"
            ],
            "type": "string",
            "description": "Промежуточная точка маршрута. Тип в поле type: loading — погрузка, unloading — разгрузка, customs — таможня, go-through — ехать через",
            "example": "loading"
          },
          "cargos": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/LoadingCargoResponse"
            },
            "description": "Грузы на погрузку",
            "example": [
              {
                "name_id": 112,
                "name": "Трубы",
                "packaging": {
                  "type": 2,
                  "quantity": 20
                },
                "cargo_id": 1,
                "weight": {
                  "type": "tons",
                  "quantity": 20
                },
                "volume": {
                  "quantity": 82
                },
                "sizes": {
                  "length": {
                    "value": 13.6,
                    "is_highlighted": false
                  },
                  "height": {
                    "value": 13.6,
                    "is_highlighted": false
                  },
                  "width": {
                    "value": 13.6,
                    "is_highlighted": false
                  },
                  "diameter": 1.2
                }
              }
            ]
          },
          "loading_date": {
            "description": "Даты погрузки в точке",
            "$ref": "#/components/schemas/WayPointArrivalDateResponse"
          },
          "city_id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Id населённого пункта. dict: POST /gw/gis-dict/v1/cities/by-ids → city_id",
            "format": "int32",
            "example": 3611
          },
          "address": {
            "type": [
              "null",
              "string"
            ],
            "description": "Адрес в населённом пункте",
            "example": "ул. Ленина, д. 10"
          },
          "coordinates": {
            "description": "Координаты адреса",
            "$ref": "#/components/schemas/CoordinatesResponse"
          },
          "catalogs_organization": {
            "description": "Организация из справочника, если в точке указана организация. Поле называется как в вебхуке cargoes.on_boards",
            "$ref": "#/components/schemas/CatalogsOrganizationResponse"
          }
        },
        "description": "Промежуточная погрузка"
      },
      "WayPointResponseUnloadingWayPointResponse": {
        "required": [
          "cargos",
          "city_id"
        ],
        "properties": {
          "type": {
            "enum": [
              "unloading"
            ],
            "type": "string",
            "description": "Промежуточная точка маршрута. Тип в поле type: loading — погрузка, unloading — разгрузка, customs — таможня, go-through — ехать через",
            "example": "unloading"
          },
          "cargos": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/UnloadingCargoResponse"
            },
            "description": "Грузы на разгрузку",
            "example": [
              {
                "packaging_quantity": 10,
                "is_defined_by_ttn": true,
                "cargo_id": 1,
                "weight": {
                  "type": "tons",
                  "quantity": 20
                },
                "volume": {
                  "quantity": 82
                },
                "sizes": {
                  "length": {
                    "value": 13.6,
                    "is_highlighted": false
                  },
                  "height": {
                    "value": 13.6,
                    "is_highlighted": false
                  },
                  "width": {
                    "value": 13.6,
                    "is_highlighted": false
                  },
                  "diameter": 1.2
                }
              }
            ]
          },
          "unloading_date": {
            "description": "Даты разгрузки в точке",
            "$ref": "#/components/schemas/WayPointArrivalDateResponse"
          },
          "city_id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Id населённого пункта. dict: POST /gw/gis-dict/v1/cities/by-ids → city_id",
            "format": "int32",
            "example": 3611
          },
          "address": {
            "type": [
              "null",
              "string"
            ],
            "description": "Адрес в населённом пункте",
            "example": "ул. Ленина, д. 10"
          },
          "coordinates": {
            "description": "Координаты адреса",
            "$ref": "#/components/schemas/CoordinatesResponse"
          },
          "catalogs_organization": {
            "description": "Организация из справочника, если в точке указана организация. Поле называется как в вебхуке cargoes.on_boards",
            "$ref": "#/components/schemas/CatalogsOrganizationResponse"
          }
        },
        "description": "Промежуточная разгрузка"
      },
      "WayPointResponseCustomsWayPointResponse": {
        "required": [
          "city_id"
        ],
        "properties": {
          "type": {
            "enum": [
              "customs"
            ],
            "type": "string",
            "description": "Промежуточная точка маршрута. Тип в поле type: loading — погрузка, unloading — разгрузка, customs — таможня, go-through — ехать через",
            "example": "customs"
          },
          "city_id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Id населённого пункта. dict: POST /gw/gis-dict/v1/cities/by-ids → city_id",
            "format": "int32",
            "example": 3611
          },
          "address": {
            "type": [
              "null",
              "string"
            ],
            "description": "Адрес в населённом пункте",
            "example": "ул. Ленина, д. 10"
          },
          "coordinates": {
            "description": "Координаты адреса",
            "$ref": "#/components/schemas/CoordinatesResponse"
          },
          "catalogs_organization": {
            "description": "Организация из справочника, если в точке указана организация. Поле называется как в вебхуке cargoes.on_boards",
            "$ref": "#/components/schemas/CatalogsOrganizationResponse"
          }
        },
        "description": "Таможня"
      },
      "WayPointResponseGoThroughWayPointResponse": {
        "required": [
          "city_id"
        ],
        "properties": {
          "type": {
            "enum": [
              "go-through"
            ],
            "type": "string",
            "description": "Промежуточная точка маршрута. Тип в поле type: loading — погрузка, unloading — разгрузка, customs — таможня, go-through — ехать через",
            "example": "go-through"
          },
          "city_id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Id населённого пункта. dict: POST /gw/gis-dict/v1/cities/by-ids → city_id",
            "format": "int32",
            "example": 3611
          },
          "address": {
            "type": [
              "null",
              "string"
            ],
            "description": "Адрес в населённом пункте",
            "example": "ул. Ленина, д. 10"
          },
          "coordinates": {
            "description": "Координаты адреса",
            "$ref": "#/components/schemas/CoordinatesResponse"
          },
          "catalogs_organization": {
            "description": "Организация из справочника, если в точке указана организация. Поле называется как в вебхуке cargoes.on_boards",
            "$ref": "#/components/schemas/CatalogsOrganizationResponse"
          }
        },
        "description": "Точка, через которую нужно проехать"
      },
      "PrepaymentResponse": {
        "required": [
          "using_fuel"
        ],
        "type": "object",
        "properties": {
          "percent": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "Процент предоплаты",
            "format": "int32",
            "example": 30
          },
          "using_fuel": {
            "type": "boolean",
            "description": "Предоплата топливом",
            "example": false
          }
        },
        "description": "Предоплата"
      },
      "PaymentModeResponse": {
        "required": [
          "type"
        ],
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/PaymentModeResponseDelayedPaymentModeResponse"
          },
          {
            "$ref": "#/components/schemas/PaymentModeResponseOnUnloadingPaymentModeResponse"
          }
        ],
        "description": "Момент оплаты. Тип в поле type: delayed-payment — с отсрочкой, on-unloading — на выгрузке",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "delayed-payment": "#/components/schemas/PaymentModeResponseDelayedPaymentModeResponse",
            "on-unloading": "#/components/schemas/PaymentModeResponseOnUnloadingPaymentModeResponse"
          }
        }
      },
      "LoadingDatesResponseReadyLoadingDatesResponse": {
        "required": [
          "is_available_tomorrow",
          "first_date",
          "last_date"
        ],
        "properties": {
          "type": {
            "enum": [
              "ready"
            ],
            "type": "string",
            "description": "Даты погрузки. Тип в поле type: ready — готов к погрузке, from-date — с указанной даты, permanent — постоянный груз, rate-request — запрос ставки, груза ещё нет",
            "example": "ready"
          },
          "is_available_tomorrow": {
            "type": "boolean",
            "description": "Груз готов к погрузке сегодня и завтра",
            "example": false
          },
          "time": {
            "description": "Время погрузки",
            "$ref": "#/components/schemas/LoadingTimeResponse"
          },
          "first_date": {
            "type": "string",
            "description": "Первый день погрузки, календарная дата в формате YYYY-MM-DD",
            "format": "date",
            "example": "2026-09-28"
          },
          "last_date": {
            "type": "string",
            "description": "Последний день погрузки, календарная дата в формате YYYY-MM-DD",
            "format": "date",
            "example": "2026-09-30"
          }
        },
        "description": "Груз готов к погрузке"
      },
      "LoadingDatesResponseFromDateLoadingDatesResponse": {
        "required": [
          "first_date",
          "last_date"
        ],
        "properties": {
          "type": {
            "enum": [
              "from-date"
            ],
            "type": "string",
            "description": "Даты погрузки. Тип в поле type: ready — готов к погрузке, from-date — с указанной даты, permanent — постоянный груз, rate-request — запрос ставки, груза ещё нет",
            "example": "from-date"
          },
          "time": {
            "description": "Время погрузки",
            "$ref": "#/components/schemas/LoadingTimeResponse"
          },
          "first_date": {
            "type": "string",
            "description": "Первый день погрузки, календарная дата в формате YYYY-MM-DD",
            "format": "date",
            "example": "2026-09-28"
          },
          "last_date": {
            "type": "string",
            "description": "Последний день погрузки, календарная дата в формате YYYY-MM-DD",
            "format": "date",
            "example": "2026-09-30"
          }
        },
        "description": "Погрузка с указанной даты"
      },
      "LoadingDatesResponsePermanentLoadingDatesResponse": {
        "required": [
          "periodicity",
          "first_date",
          "last_date"
        ],
        "properties": {
          "type": {
            "enum": [
              "permanent"
            ],
            "type": "string",
            "description": "Даты погрузки. Тип в поле type: ready — готов к погрузке, from-date — с указанной даты, permanent — постоянный груз, rate-request — запрос ставки, груза ещё нет",
            "example": "permanent"
          },
          "time": {
            "description": "Время погрузки",
            "$ref": "#/components/schemas/LoadingTimeResponse"
          },
          "periodicity": {
            "type": [
              "null",
              "string"
            ],
            "description": "Периодичность: everyday — каждый день, workdays — по рабочим дням",
            "example": "everyday"
          },
          "first_date": {
            "type": "string",
            "description": "Первый день погрузки, календарная дата в формате YYYY-MM-DD",
            "format": "date",
            "example": "2026-09-28"
          },
          "last_date": {
            "type": "string",
            "description": "Последний день погрузки, календарная дата в формате YYYY-MM-DD",
            "format": "date",
            "example": "2026-09-30"
          }
        },
        "description": "Постоянный груз"
      },
      "LoadingDatesResponseRateRequestLoadingDatesResponse": {
        "required": [
          "first_date",
          "last_date"
        ],
        "properties": {
          "type": {
            "enum": [
              "rate-request"
            ],
            "type": "string",
            "description": "Даты погрузки. Тип в поле type: ready — готов к погрузке, from-date — с указанной даты, permanent — постоянный груз, rate-request — запрос ставки, груза ещё нет",
            "example": "rate-request"
          },
          "first_date": {
            "type": "string",
            "description": "Первый день погрузки, календарная дата в формате YYYY-MM-DD",
            "format": "date",
            "example": "2026-09-28"
          },
          "last_date": {
            "type": "string",
            "description": "Последний день погрузки, календарная дата в формате YYYY-MM-DD",
            "format": "date",
            "example": "2026-09-30"
          }
        },
        "description": "Запрос ставки: груза ещё нет"
      },
      "PackagingResponse": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Id типа упаковки. dict: GET /v1.0/dictionaries/packTypes → Id",
            "format": "int32",
            "example": 2
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "Количество мест",
            "format": "int32",
            "example": 20
          }
        },
        "description": "Упаковка груза"
      },
      "WeightResponse": {
        "required": [
          "type",
          "quantity"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "null",
              "string"
            ],
            "description": "Единица веса: tons — тонны, kilos — килограммы",
            "example": "tons"
          },
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "Вес в единицах из type",
            "format": "double",
            "example": 20
          }
        },
        "description": "Вес груза"
      },
      "VolumeResponse": {
        "required": [
          "quantity"
        ],
        "type": "object",
        "properties": {
          "quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "Объём, м³",
            "format": "double",
            "example": 82
          }
        },
        "description": "Объём груза"
      },
      "SizesResponse": {
        "type": "object",
        "properties": {
          "length": {
            "description": "Длина",
            "$ref": "#/components/schemas/SizeResponse"
          },
          "height": {
            "description": "Высота",
            "$ref": "#/components/schemas/SizeResponse"
          },
          "width": {
            "description": "Ширина",
            "$ref": "#/components/schemas/SizeResponse"
          },
          "diameter": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "description": "Диаметр, метры",
            "format": "double",
            "example": 1.2
          }
        },
        "description": "Габариты груза"
      },
      "LoadingTimeResponse": {
        "required": [
          "type"
        ],
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/LoadingTimeResponseBoundedLoadingTimeResponse"
          },
          {
            "$ref": "#/components/schemas/LoadingTimeResponseRoundTheClockLoadingTimeResponse"
          }
        ],
        "description": "Время погрузки или разгрузки. Тип в поле type: bounded — интервал, round-the-clock — круглосуточно",
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "bounded": "#/components/schemas/LoadingTimeResponseBoundedLoadingTimeResponse",
            "round-the-clock": "#/components/schemas/LoadingTimeResponseRoundTheClockLoadingTimeResponse"
          }
        }
      },
      "WayPointArrivalDateResponse": {
        "type": "object",
        "properties": {
          "first_date": {
            "type": [
              "null",
              "string"
            ],
            "description": "Первый день прибытия в точку, календарная дата в формате YYYY-MM-DD",
            "format": "date",
            "example": "2026-09-28"
          },
          "last_date": {
            "type": [
              "null",
              "string"
            ],
            "description": "Последний день прибытия в точку, календарная дата в формате YYYY-MM-DD",
            "format": "date",
            "example": "2026-09-30"
          },
          "time": {
            "description": "Время в точке",
            "$ref": "#/components/schemas/LoadingTimeResponse"
          }
        },
        "description": "Даты прибытия в промежуточную точку"
      },
      "UnloadingCargoResponse": {
        "required": [
          "cargo_id"
        ],
        "type": "object",
        "properties": {
          "packaging_quantity": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "null",
              "integer",
              "string"
            ],
            "description": "Сколько мест упаковки выгружается в точке",
            "format": "int32",
            "example": 10
          },
          "is_defined_by_ttn": {
            "type": [
              "null",
              "boolean"
            ],
            "description": "Выгружаемая часть груза будет указана в ТТН",
            "example": true
          },
          "cargo_id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Порядковый номер груза внутри заявки",
            "format": "int32",
            "example": 1
          },
          "weight": {
            "description": "Вес",
            "$ref": "#/components/schemas/WeightResponse"
          },
          "volume": {
            "description": "Объём",
            "$ref": "#/components/schemas/VolumeResponse"
          },
          "sizes": {
            "description": "Габариты",
            "$ref": "#/components/schemas/SizesResponse"
          }
        },
        "description": "Груз в точке разгрузки"
      },
      "PaymentModeResponseDelayedPaymentModeResponse": {
        "required": [
          "payment_delay_days"
        ],
        "properties": {
          "type": {
            "enum": [
              "delayed-payment"
            ],
            "type": "string",
            "description": "Момент оплаты. Тип в поле type: delayed-payment — с отсрочкой, on-unloading — на выгрузке",
            "example": "delayed-payment"
          },
          "payment_delay_days": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "description": "Отсрочка, банковских дней",
            "format": "int32",
            "example": 5
          }
        },
        "description": "Оплата с отсрочкой"
      },
      "PaymentModeResponseOnUnloadingPaymentModeResponse": {
        "properties": {
          "type": {
            "enum": [
              "on-unloading"
            ],
            "type": "string",
            "description": "Момент оплаты. Тип в поле type: delayed-payment — с отсрочкой, on-unloading — на выгрузке",
            "example": "on-unloading"
          }
        },
        "description": "Оплата на выгрузке"
      },
      "SizeResponse": {
        "required": [
          "value",
          "is_highlighted"
        ],
        "type": "object",
        "properties": {
          "value": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "description": "Значение, метры",
            "format": "double",
            "example": 13.6
          },
          "is_highlighted": {
            "type": "boolean",
            "description": "Выделять значение цветом в результатах поиска",
            "example": false
          }
        },
        "description": "Габаритный размер груза"
      },
      "LoadingTimeResponseBoundedLoadingTimeResponse": {
        "properties": {
          "type": {
            "enum": [
              "bounded"
            ],
            "type": "string",
            "description": "Время погрузки или разгрузки. Тип в поле type: bounded — интервал, round-the-clock — круглосуточно",
            "example": "bounded"
          },
          "start": {
            "pattern": "^-?(\\d+\\.)?\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,7})?$",
            "type": [
              "null",
              "string"
            ],
            "description": "Начало интервала, HH:mm:ss",
            "example": "08:00:00"
          },
          "end": {
            "pattern": "^-?(\\d+\\.)?\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,7})?$",
            "type": [
              "null",
              "string"
            ],
            "description": "Конец интервала, HH:mm:ss",
            "example": "18:00:00"
          },
          "offset": {
            "pattern": "^-?(\\d+\\.)?\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,7})?$",
            "type": [
              "null",
              "string"
            ],
            "description": "Смещение часового пояса точки от UTC, HH:mm:ss; западнее Гринвича — со знаком минус",
            "example": "03:00:00"
          }
        },
        "description": "Интервал времени по местному времени точки"
      },
      "LoadingTimeResponseRoundTheClockLoadingTimeResponse": {
        "properties": {
          "type": {
            "enum": [
              "round-the-clock"
            ],
            "type": "string",
            "description": "Время погрузки или разгрузки. Тип в поле type: bounded — интервал, round-the-clock — круглосуточно",
            "example": "round-the-clock"
          }
        },
        "description": "Круглосуточно"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Authorization: Bearer {authorizationToken}"
      }
    }
  }
}