{
  "openapi": "3.0.0",
  "info": {
    "title": "api/orders/deals",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "/"
    },
    {
      "url": "https://api.ati.su"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/v1.2/orders/{dealId}": {
      "get": {
        "tags": [
          "Заказы"
        ],
        "summary": "Получение информации по Заказу",
        "description": "Позволяет получить Заказ, в котором пользователь принимает участие",
        "operationId": "Orders_GetOrderInfo",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "Id Заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Возвращает информацию по Заказу",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderViewOfFullDealView"
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/search": {
      "post": {
        "tags": [
          "Заказы"
        ],
        "summary": "Получение списка Заказов по фильтру",
        "description": "Позволяет список Заказов по указанным id грузов, если список пуст вернет все Заказы в которых пользователь принимает участие",
        "operationId": "Orders_GetOrders",
        "requestBody": {
          "x-name": "filter",
          "description": "Фильтр для получения заказов",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/OrderFilter2"
                  }
                ]
              }
            }
          },
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Возвращает информацию о Заказах по фильтру",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrderViewOfFullDealView"
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/{dealId}/decline": {
      "delete": {
        "tags": [
          "Заказы"
        ],
        "summary": "Отклонение Заказа с выбором действия",
        "description": "Грузовладелец может отклонить Заказ в согласовании, в том числе с\nсозданными документами через АТИ-Доки.\nПри отклонении Заказа можно выбрать, что сделать с грузом:\n1= выставить груз без Торгов,\n2 = перенести груз в Архив.\n3 = сменить победителя, если в Торгах были еще участники\n4 = восстановить груз и перезапустить Торги, если они были запущены",
        "operationId": "Orders_Decline2",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "Id заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "declineOrderDto",
          "description": "Причина отмены + действие после",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/DeclineOrderIntegratorsDto"
                  }
                ]
              }
            }
          },
          "x-position": 2
        },
        "responses": {
          "200": {
            "description": "Успешное отклонение заказа",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v2/orders/unilateral": {
      "post": {
        "tags": [
          "Заказы"
        ],
        "summary": "Создание и изменение заявки водителю.",
        "operationId": "Orders_SaveUnilateral",
        "requestBody": {
          "x-name": "request",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/SaveUnilateralOrderDtoNew"
                  }
                ]
              }
            }
          },
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Возвращает информацию по Заказу",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnilateralOrderViewOfFullDealView"
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/get_orders_statuses": {
      "post": {
        "tags": [
          "Заказы"
        ],
        "summary": "Получение статусов Заказов",
        "description": "Позволяет получить список статусов Заказов для указанных грузов",
        "operationId": "Orders_GetDealsStatusInfoByLoadsIds",
        "requestBody": {
          "x-name": "loadIds",
          "description": "Список Id грузов",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "nullable": true,
                "items": {
                  "type": "string",
                  "format": "guid"
                }
              }
            }
          },
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Возвращает объект _Id груза - список статусов связанных Заказов_",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/DealStatusView"
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/gw/driver/v1/transportations/{dealId}/status": {
      "post": {
        "tags": [
          "Заказы"
        ],
        "summary": "Смена cтатуса перевозки Заказа",
        "description": "Позволяет установить статус перевозки для Заказа.\nТребуется DealState Заказа `4`.\nУстановить статус может как грузовладелец так и перевозчик.",
        "operationId": "Driver_SetTransportationStatus",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "Id Заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "dealInWork",
          "description": "Cтатус перевозки Заказа и его параметры",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DealInWorkDto"
              }
            }
          },
          "x-position": 2
        },
        "responses": {
          "200": {
            "description": "Успешное изменение статуса",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwaggerExampleBaseApiException"
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/{dealId}/pay_docs": {
      "post": {
        "tags": [
          "Заказы"
        ],
        "summary": "Изменение информации о статусе документов и оплаты",
        "description": "Позволяет установить статус документов и оплаты для Заказа.\nТребуется DealState Заказа `10` или `5`.",
        "operationId": "Orders_SetPaymentStatus",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "Id Заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "payDocs",
          "description": "Информация о статусе документов и оплаты",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PayDocsDto2"
                  }
                ]
              }
            }
          },
          "x-position": 2
        },
        "responses": {
          "200": {
            "description": "Успешное изменение статуса"
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/{dealId}/move_to_work": {
      "post": {
        "tags": [
          "Заказы"
        ],
        "summary": "Создание Заказа без документов",
        "description": "Позволяет создать Заказ без оформления документов через АТИ-Доки сразу после того, как перевозчик пришлет вам предложение на перевозку.",
        "operationId": "Orders_MoveToWork",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "ID Заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "dto",
          "description": "Параметры Заказа",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/OrderToWorkDtoInbox"
                  }
                ]
              }
            }
          },
          "x-position": 2
        },
        "responses": {
          "200": {
            "description": "Успешное создание Заказа"
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/{dealId}/accept": {
      "post": {
        "tags": [
          "Заказы"
        ],
        "summary": "Создание Заказа с документом через АТИ-Доки",
        "description": "Позволяет создать Заказ с документом через АТИ-Доки",
        "operationId": "Orders_Accept",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "Id Заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "dto",
          "description": "Данные грузовладельца для Заказа",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/DealAcceptFromLoadIntegratorsDtoInbox"
                  }
                ]
              }
            }
          },
          "x-position": 2
        },
        "responses": {
          "200": {
            "description": "Параметры ссылки для открытия Заказа в АТИ-Доках",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentInfoShortView"
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/{dealId}/accept_file": {
      "post": {
        "tags": [
          "Заказы"
        ],
        "summary": "Создание Заказа с документом через загрузку файла",
        "description": "Позволяет создать Заказ с документом через загрузку файла, содержащего информацию о заказе (адреса, контакты, сроки, стоимость перевозки, условия и др.)\nContent-Type: multipart/form-data",
        "operationId": "Orders_AcceptWithFile",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "Id Заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "document_type": {
                    "type": "string",
                    "nullable": true
                  },
                  "requisite_id": {
                    "type": "string",
                    "format": "guid",
                    "nullable": true
                  },
                  "signer_id": {
                    "type": "string",
                    "format": "guid",
                    "nullable": true
                  },
                  "contract_number": {
                    "type": "string",
                    "nullable": true
                  },
                  "contract_start_date": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true
                  },
                  "attachment": {
                    "type": "string",
                    "format": "binary",
                    "nullable": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Параметры ссылки для открытия Заказа",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentInfoShortView"
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/takeload/{loadId}": {
      "post": {
        "tags": [
          "Заказы"
        ],
        "summary": "Взятие груза / Редактирование Заказа",
        "description": "Взятие груза возможно в том случае, если пользователь является победителем Торгов (аукциона), получил приглашение от грузовладельца или состоит на площадке, где опубликован груз.",
        "operationId": "Orders_TakeLoad",
        "parameters": [
          {
            "name": "loadId",
            "in": "path",
            "required": true,
            "description": "Id груза",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "loadTakeInfoIntegratorsDto",
          "description": "Параметры Заказа",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/LoadTakeInfoIntegratorsDto"
                  }
                ]
              }
            }
          },
          "x-position": 2
        },
        "responses": {
          "200": {
            "description": "Успешное взятие/редактирование",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrderViewOfFullDealView"
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/{dealId}/finish": {
      "put": {
        "tags": [
          "Заказы"
        ],
        "summary": "Завершение перевозки",
        "description": "Завершает перевозку\n\n*Завершить перевозку можно в том случае, если DealState Заказа `4`*",
        "operationId": "Orders_Finish",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "Id Заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          },
          {
            "name": "waitPayment",
            "in": "query",
            "description": "При выставлении этого флага Заказ переносится на вкладку \"ДО и Оплата\"",
            "schema": {
              "type": "boolean"
            },
            "x-position": 2
          }
        ],
        "responses": {
          "200": {
            "description": "Успешное завершение"
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/driver": {
      "put": {
        "tags": [
          "Заказы"
        ],
        "summary": "Смена Водителя в Заказе",
        "description": "Смена Водителя для Заказов без документов, созданных в системе АТИ-Доки.\nТребуется DealState Заказа `4`.\nСменить Водителя может как грузовладелец, так и перевозчик.",
        "operationId": "Orders_ChangeDriver",
        "requestBody": {
          "x-name": "dto",
          "description": "Информация о смене водителя",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ChangeDriverDto"
                  }
                ]
              }
            }
          },
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Успешная смена водителя"
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/truck": {
      "put": {
        "tags": [
          "Заказы"
        ],
        "summary": "Смена ТС в Заказе",
        "description": "Смена Транспортного Средства для Заказов без документов, созданных в системе АТИ-Доки.\nТребуется DealState Заказа `4`.\nСменить ТС может как грузовладелец, так и перевозчик.",
        "operationId": "Orders_ChangeTruck",
        "requestBody": {
          "x-name": "dto",
          "description": "Информация по смене ТС",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ChangeTruckDto"
                  }
                ]
              }
            }
          },
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Успешная смена ТС"
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/rate": {
      "put": {
        "tags": [
          "Заказы"
        ],
        "summary": "Изменение ставки в Заказе",
        "description": "Изменение ставки в Заказе без документов, созданных в системе АТИ-Доки.\nТребуется DealState Заказа `4` - В исполнении, `10` - Документы и Оплата.\nИзменить ставку может грузовладелец.",
        "operationId": "Orders_ChangeRate",
        "requestBody": {
          "x-name": "dto",
          "description": "Параметры изменения ставки",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ChangeRateDto"
                  }
                ]
              }
            }
          },
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Успешное изменение ставки"
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/address": {
      "put": {
        "tags": [
          "Заказы"
        ],
        "summary": "Изменение маршрута в Заказе",
        "description": "Изменение маршрута в Заказе без документов, созданных в системе АТИ-Доки.\nТребуется DealState Заказа `4` - В исполнении, `10` - Документы и Оплата.\nИзменить маршрут может грузовладелец.",
        "operationId": "Orders_ChangeAddress",
        "requestBody": {
          "x-name": "dto",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ChangeAddressDto"
                  }
                ]
              }
            }
          },
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Возвращает структуру такого же вида, как на входе, с признаком изменения changed"
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/dates": {
      "put": {
        "tags": [
          "Заказы"
        ],
        "summary": "Изменение дат и времени загрузки, разгрузки в Заказе",
        "description": "Изменение дат и времени загрузки, разгрузки в Заказе без документов, созданных в системе АТИ-Доки.\nИзменить даты и время может грузовладелец.",
        "operationId": "Orders_ChangeDates",
        "requestBody": {
          "x-name": "dto",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ChangeDatesDto"
                  }
                ]
              }
            }
          },
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Возвращает структуру такого же вида, как на входе, включая данные, которые были"
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/contacts": {
      "put": {
        "tags": [
          "Заказы"
        ],
        "summary": "Смена контактов в Заказе",
        "description": "Сменить контакты может грузовладелец",
        "operationId": "Orders_ChangeContacts",
        "requestBody": {
          "x-name": "dto",
          "description": "Параметры смены контактов",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ChangeContactsDto"
                  }
                ]
              }
            }
          },
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Успешная смена контактов"
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/note": {
      "put": {
        "tags": [
          "Заказы"
        ],
        "summary": "Изменение примечания к грузу в Заказе",
        "operationId": "Orders_ChangeNote",
        "requestBody": {
          "x-name": "dto",
          "content": {
            "application/json": {
              "schema": {
                "nullable": true,
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ChangeNoteDto"
                  }
                ]
              }
            }
          },
          "x-position": 1
        },
        "responses": {
          "200": {
            "description": "Успешное изменение примечания"
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/{dealId}/delete_obsolete": {
      "delete": {
        "tags": [
          "Заказы"
        ],
        "summary": "Удаление неактуального заказа",
        "description": "Удаляет заказ, которые не может быть выполнен, например взятый перевозчиком, а затем отклоненный грузовладельцем.",
        "operationId": "Orders_DeleteObsolete",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "Id заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Успешное удаление"
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/redirect/to_deal/{dealId}": {
      "get": {
        "tags": [
          "Попап создания/редактирования заявки"
        ],
        "summary": "Получение ссылки на попап редактирования документа",
        "description": "Открытие попапа происходит по ссылке. Возможно только в том случае, если действие производит грузовладелец, а Заказ находится на этапе согласования.",
        "operationId": "Redirect_GetDealRedirect",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "Id Заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          },
          {
            "name": "action",
            "in": "query",
            "description": "Выполняемое действие, должен быть равен \"create_document\"",
            "schema": {
              "type": "string"
            },
            "x-position": 2
          }
        ],
        "responses": {
          "200": {
            "description": "Успешное получение ссылки",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "nullable": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/FinalExceptionModelOfFinalException"
                    }
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "DateType": {
        "type": "integer",
        "description": "Готовность груза к перевозке\n            \n* `0` — Готов к отправке сегодня или завтра\n* `1` — Готов к отправке между FirstDate и LastDate\n* `2` — Готов к отправке постоянно\n* `3` — Груза нет, запрос ставки",
        "x-enumNames": [
          "ReadyToLoading",
          "BetweenTwoDates",
          "AlwaysReady",
          "MissingLoad"
        ],
        "enum": [
          0,
          1,
          2,
          3
        ]
      },
      "Periodicity": {
        "type": "integer",
        "description": "Периодичность загрузки\n            \n* `0` — Нет\n* `1` — Ежедневно\n* `100` — Только по рабочим дням",
        "x-enumNames": [
          "None",
          "EveryDay",
          "OnlyWorkingDays"
        ],
        "enum": [
          0,
          1,
          100
        ]
      },
      "LargeCityWithDistance": {
        "type": "object",
        "description": "Сущность, описывающая ближайший крупный город",
        "additionalProperties": false,
        "properties": {
          "city_id": {
            "type": "integer",
            "description": "Id города\\\nЗначение из [словаря городов АТИ](https://ati.su/developers/api/dictionaries/geo/) ",
            "format": "int64",
            "nullable": true
          },
          "distance": {
            "type": "number",
            "description": "Расстояние",
            "format": "double",
            "nullable": true
          }
        }
      },
      "LoadingCargo": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "cargo_id": {
            "type": "integer",
            "description": "Id груза",
            "format": "int32"
          },
          "name_id": {
            "type": "integer",
            "description": "Наименование груза",
            "format": "int32",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "packaging_type": {
            "type": "integer",
            "description": "Упаковка",
            "format": "int32",
            "nullable": true
          },
          "packaging_quantity": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "weight": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "volume": {
            "type": "number",
            "description": "Объем",
            "format": "double",
            "nullable": true
          },
          "sizes": {
            "description": "Габариты",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoadSize"
              }
            ]
          },
          "packaging_type_name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "LoadSize": {
        "type": "object",
        "description": "Размеры груза",
        "additionalProperties": false,
        "properties": {
          "length": {
            "type": "number",
            "description": "Длина в метрах",
            "format": "double",
            "nullable": true
          },
          "width": {
            "type": "number",
            "description": "Ширина в метрах",
            "format": "double",
            "nullable": true
          },
          "height": {
            "type": "number",
            "description": "Высота в метрах",
            "format": "double",
            "nullable": true
          },
          "diameter": {
            "type": "number",
            "description": "Диаметр в метрах",
            "format": "double",
            "nullable": true
          },
          "length_highlight": {
            "type": "boolean",
            "description": "Подсвечивать ли длину",
            "nullable": true
          },
          "width_highlight": {
            "type": "boolean",
            "description": "Подсвечивать ли ширину",
            "nullable": true
          },
          "height_highlight": {
            "type": "boolean",
            "description": "Подсвечивать ли высоту",
            "nullable": true
          }
        }
      },
      "Organization": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "guid"
          },
          "firm_id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "ownership": {
            "type": "integer",
            "format": "int32"
          },
          "residency": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Residency"
              }
            ]
          },
          "inn": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "extra_phone": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "docs_address": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/OrganizationDocsAddress"
              }
            ]
          },
          "stocks": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/Stock"
            }
          },
          "contact_persons": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ContactPerson"
            }
          },
          "ownership_name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "Residency": {
        "type": "integer",
        "description": "Резидентство\n            \n* `1` — Россия\n* `2` — Украина\n* `3` — Беларусь\n* `10` — Казахстан\n* `200` — Международное (другое)",
        "x-enumNames": [
          "Russia",
          "Ukraine",
          "Belarus",
          "Kazakhstan",
          "International"
        ],
        "enum": [
          1,
          2,
          3,
          10,
          200
        ]
      },
      "OrganizationDocsAddress": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "postcode": {
            "type": "string",
            "nullable": true
          },
          "city_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "street_name": {
            "type": "string",
            "nullable": true
          },
          "house_no": {
            "type": "string",
            "nullable": true
          },
          "office_no": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "Stock": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "stock_id": {
            "type": "string",
            "format": "guid"
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "address_city_id": {
            "type": "integer",
            "format": "int32"
          },
          "address_latitude": {
            "type": "number",
            "format": "double"
          },
          "address_longitude": {
            "type": "number",
            "format": "double"
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "work_schedules": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/StockSchedule"
            }
          },
          "breaks_schedules": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/StockSchedule"
            }
          },
          "contact_persons": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ContactPerson"
            }
          },
          "schedule_summary": {
            "type": "string",
            "nullable": true
          },
          "stock_type": {
            "$ref": "#/components/schemas/StockType"
          },
          "timeslots_binding": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimeslotsBinding"
              }
            ]
          }
        }
      },
      "StockSchedule": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "stock_schedule_id": {
            "type": "string",
            "format": "guid"
          },
          "day_of_week": {
            "$ref": "#/components/schemas/DayOfWeek"
          },
          "start_time": {
            "type": "string",
            "format": "duration"
          },
          "end_time": {
            "type": "string",
            "format": "duration"
          }
        }
      },
      "DayOfWeek": {
        "type": "integer",
        "description": "",
        "x-enumNames": [
          "Sunday",
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday",
          "Saturday"
        ],
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6
        ]
      },
      "ContactPerson": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "contact_person_id": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "StockType": {
        "type": "integer",
        "description": "",
        "x-enumNames": [
          "Stock",
          "Office",
          "Store"
        ],
        "enum": [
          1,
          2,
          3
        ]
      },
      "TimeslotsBinding": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "warehouse_id": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "$ref": "#/components/schemas/TimeslotsBindingStatus"
          }
        }
      },
      "TimeslotsBindingStatus": {
        "type": "integer",
        "description": "",
        "x-enumNames": [
          "AwaitReaction",
          "Accepted",
          "Revoked",
          "Rejected"
        ],
        "enum": [
          0,
          1,
          2,
          3
        ]
      },
      "LoadExtraPointType": {
        "type": "integer",
        "description": "Тип дополнительной точки маршрута груза\n            \n* `1` — Загрузка\n* `2` — Разгрузка\n* `3` — Таможня\n* `4` — Ближайший крупный город к городу загрузки\n* `5` — Ближайший крупный город к городу разгрузки\n* `8` — Проехать через",
        "x-enumNames": [
          "LoadingExtraPoint",
          "UnloadingExtraPoint",
          "CustomExtraPoint",
          "LoadingLargeCity",
          "UnloadingLargeCity",
          "DriverThrough"
        ],
        "enum": [
          1,
          2,
          3,
          4,
          5,
          8
        ]
      },
      "UnloadingCargo": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "cargo_id": {
            "type": "integer",
            "description": "Id груза",
            "format": "int32"
          },
          "weight": {
            "type": "number",
            "description": "Вес",
            "format": "double",
            "nullable": true
          },
          "volume": {
            "type": "number",
            "description": "Объём",
            "format": "double",
            "nullable": true
          },
          "packaging_quantity": {
            "type": "integer",
            "description": "Выгружаемая часть упаковки",
            "format": "int32",
            "nullable": true
          },
          "is_defined_by_ttn": {
            "type": "boolean",
            "description": "Выгружаемая часть груза будет определена в ТТН",
            "nullable": true
          }
        }
      },
      "DogruzType": {
        "type": "integer",
        "description": "Параметр, отвечающий за способ перевозки груза\n            \n* `1` — Только отдельной машиной\n* `2` — Догруз возможен\n* `3` — Догруз",
        "x-enumNames": [
          "OnlyToSeparateCar",
          "DogruzPossible",
          "Dogruz"
        ],
        "enum": [
          1,
          2,
          3
        ]
      },
      "LoadMeta": {
        "type": "object",
        "description": "Метаданные груза",
        "additionalProperties": false,
        "properties": {
          "load_meta_id": {
            "type": "string",
            "description": "Id",
            "format": "guid",
            "nullable": true
          },
          "meta_data": {
            "type": "string",
            "description": "Данные",
            "nullable": true
          }
        }
      },
      "DealState": {
        "type": "integer",
        "description": "Статус Заказа\n\n* `0` — Груз зарезервирован перевозчиком\n* `1` — Перевозчик заполнил информацию о реквизитах/водителе/машине и грузовладелец не просмотрел заявку\n* `2` — Перевозчик заполнил информацию о реквизитах/водителе/машине и грузовладелец просмотрел заявку\n* `3` — Грузовладелец отправил документ-заявку перевозчику\n* `4` — Заказ в исполнении (перевозчик дал согласие на документ-заявку)\n* `5` — Заказ завершен и перенесен в архив\n* `7` — Есть только приглашение на Заказ\n* `8` — Заказа нет, но есть Торги, у которых есть возможные победители\n* `9` — Заказ отклонен автоматически, так как после последней даты загрузки прошло уже более 20 дней\n* `10` — Заказ завершен, ожидается оплата\n* `11` — В Торгах лучшая ставка из других Торгов\n* `-11` — Заказ удален\n* `-10` — Резерв груза перевозчиком отменен\n* `-9` — Заказ отклонен грузовладельцем в Торгах после истечения срока подачи документов (смена победителя)\n* `-8` — Грузовладелец отменил Заказ в исполнении\n* `-7` — Перевозчик отменил Заказ в исполнении\n* `-6` — Заказ отклонен грузовладельцем после удаления Торгов\n* `-4` — Заказ отклонен грузовладельцем в Торгах (смена победителя)\n* `-3` — Заказ отклонен грузовладельцем\n* `-2` — Заказ отозван перевозчиком",
        "x-enumNames": [
          "Reserve",
          "Taken",
          "TakenViewed",
          "DocumentSentByCargoOwner",
          "DocumentApprovedByTrucker",
          "Finished",
          "PersonalDealInvite",
          "AuctionWithPossibleWinner",
          "CancelAuto",
          "WaitPaymentAndDocuments",
          "BestRateFromOtherPassThroughAuction",
          "Deleted",
          "ReserveCanceled",
          "DenialInAuctionByDocExpired",
          "CancelInWorkByCargoOwner",
          "CancelInWorkByTrucker",
          "DenialBecauseDeleteAuction",
          "DenialInAuction",
          "DenialByCargoOwner",
          "DenialByTrucker"
        ],
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          7,
          8,
          9,
          10,
          11,
          -11,
          -10,
          -9,
          -8,
          -7,
          -6,
          -4,
          -3,
          -2
        ]
      },
      "RateType": {
        "type": "integer",
        "description": "Тип оплаты\n            \n* `0` — Нет\n* `1` — Любая\n* `2` — С НДС\n* `3` — Без НДС",
        "x-enumNames": [
          "None",
          "Common",
          "Nds",
          "WithoutNds"
        ],
        "enum": [
          0,
          1,
          2,
          3
        ]
      },
      "DocumentType": {
        "type": "integer",
        "description": "Тип документа\n            \n* `0` — Нет\n* `1` — Заказ\n* `2` — Договор-заявка\n* `3` — Поручение экспедитору\n* `4` — Акт\n* `5` — Счет\n* `6` — Одностороннее расторжение\n* `7` — Доверенность\n* `8` — Табличный заказ\n* `9` — Заявка к договору (табличный вид)",
        "x-enumNames": [
          "None",
          "Order",
          "Application",
          "ForwarderInstruction",
          "Act",
          "Invoice",
          "UnilateralDissolution",
          "PowerOfAttorney",
          "TableOrder",
          "TableApplication"
        ],
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9
        ]
      },
      "DealDocumentAccess": {
        "type": "integer",
        "description": "Доступ к документу\n            \n* `0` — Обе стороны\n* `1` — Водитель",
        "x-enumFlags": true,
        "x-enumNames": [
          "SharedWithCounterparty",
          "SharedWithAtiTrucker"
        ],
        "enum": [
          0,
          1
        ]
      },
      "InWorkStatusModel": {
        "type": "integer",
        "description": "Статусная модель перевозки\n            \n* `0` — Простая перевозка\n* `1` — Первая миля\n* `2` — Последняя миля\n* `3` — Порожний контейнер",
        "x-enumNames": [
          "Default",
          "FirstMile",
          "LastMile",
          "EmptyContainer"
        ],
        "enum": [
          0,
          1,
          2,
          3
        ]
      },
      "DealFileAccess": {
        "type": "integer",
        "description": "Доступ к файлу\n            \n* `0` — только загрузивший файл\n* `1` — обе стороны\n* `2` — загрузивший файл и водитель\n* `3` — доступен обеим сторонам и водителю",
        "x-enumFlags": true,
        "x-enumNames": [
          "OnlyYou",
          "SharedWithCounterparty",
          "SharedWithAtiTrucker",
          "SharedWithAtiTruckerAndCounterparty"
        ],
        "enum": [
          0,
          1,
          2,
          3
        ]
      },
      "DealFileSourceTypes": {
        "type": "integer",
        "description": "Источник файла\n            \n* `0` — Загружен в заказ\n* `1` — Скопирован из груза\n* `2` — Скопирован из данных о водителе\n* `3` — Скопироване из данных о грузовике\n* `4` — Скопирован из данных о прицепе\n* `5` — Скопирован из данных о полуприцепе\n* `6` — Скопирован из данных о тягаче\n* `7` — Загружен для Ати-водителя\n* `8` — Загружен из приложения АТИ-водитель\n* `9` — Загружен из Gallifrey (Временные окна)",
        "x-enumNames": [
          "SimpleLoader",
          "Load",
          "Driver",
          "Truck",
          "Trailer",
          "SemiTrailer",
          "Tractor",
          "AtiTruckerPopupLoader",
          "FromAtiDriver",
          "FromGallifrey"
        ],
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9
        ]
      },
      "DealFileSourceFileTypes": {
        "type": "integer",
        "description": "Тип загруженного файла\n            \n* `0` — Обычный файл\n* `1` — Скан водительского удостоверения\n* `2` — Скан гражданского паспорта водителя\n* `3` — Скан ПТС\n* `4` — Скан пластикового ПТС\n* `5` — Фото ТС\n* `8` - Скан договора о безвоздмездном пользовании",
        "x-enumNames": [
          "None",
          "DriverLicense",
          "DriverPassport",
          "TruckTechPassport",
          "TruckPlasticTechPassport",
          "TruckPhoto",
          "FreeUse"
        ],
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          8
        ]
      },
      "DealFileType": {
        "type": "integer",
        "description": "Тип файла\n            \n* `0` — Другой документ\n* `1` — Товарно-транспортная накладная\n* `2` — Товарная накладная\n* `3` — Транспортная накладная\n* `4` — Накладная\n* `5` — Счет-фактура\n* `6` — Счет на оплату\n* `7` — Платежное поручение\n* `8` — Акт выполненных работ\n* `9` — Заявка\n* `10` — Заявка к договору\n* `11` — Заказ\n* `12` — Договор\n* `13` — Доп. соглашение к договору\n* `14` — Доверенность\n* `15` — Поручение экспедитору\n* `16` — Информационное письмо\n* `17` — Документ о происшествии с грузом/ТС",
        "x-enumNames": [
          "OtherDoc",
          "ConsignmentNote",
          "PackingList",
          "WayBill",
          "WayBillGeneral",
          "Invoice",
          "InvoiceForPayment",
          "PaymentOrder",
          "CertificateOfCompletion",
          "Request",
          "RequestForOrder",
          "Order",
          "Contract",
          "SupplementaryAgreement",
          "Dealership",
          "Assignment",
          "InfoLetter",
          "AccidentAct"
        ],
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17
        ]
      },
      "DealPointTypes": {
        "type": "integer",
        "description": "Тип точки маршрута\n            \n* `1` — Загрузка\n* `2` — Разгрузка\n* `3` — Таможня\n* `8` — Ехать через",
        "x-enumNames": [
          "Loading",
          "Unloading",
          "Customs",
          "GoThrough"
        ],
        "enum": [
          1,
          2,
          3,
          8
        ]
      },
      "DealInWorkDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "in_work_status": {
            "description": "Статус заказа в работе",
            "oneOf": [
              {
                "$ref": "#/components/schemas/InWorkStatus"
              }
            ]
          },
          "in_work_date": {
            "type": "string",
            "description": "Дата",
            "format": "date-time",
            "nullable": true
          },
          "firm_id": {
            "type": "integer",
            "description": "Id пользователя",
            "format": "int32",
            "nullable": true
          },
          "contact_id": {
            "type": "integer",
            "description": "контакт",
            "format": "int32",
            "nullable": true
          },
          "tracker_phone": {
            "type": "integer",
            "description": "Телефон водителя",
            "format": "int64",
            "nullable": true
          }
        }
      },
      "InWorkStatus": {
        "type": "integer",
        "description": "Статус перевозки\n            \n* `0` — Нет статуса\n* `1` — Едет на загрузку\n* `2` — Ожидает загрузку\n* `3` — Загружается\n* `4` — Загрузился, едет на выгрузку\n* `5` — Ожидает выгрузку\n* `6` — Выгружается\n* `7` — Выгрузился\n* `8` — Поломка\n* `9` — ДТП\n* `10` — Арест ТС\n* `11` — Контейнер получен на погрузку\n* `12` — Контейнер на погрузке\n* `13` — Погрузка контейнера окончена\n* `14` — Контейнер сдан с погрузки\n* `15` — Контейнер получен на выгрузку\n* `16` — Контейнер на выгрузке\n* `17` — Выгрузка контейнера окончена\n* `18` — Контейнер сдан с выгрузки\n* `19` — Пустой контейнер получен\n* `20` — Пустой контейнер сдан\n* `100` — Заказ завершён",
        "x-enumNames": [
          "None",
          "GoToLoading",
          "ReadyToLoad",
          "Loading",
          "Loaded",
          "ReadyToUnload",
          "Unloading",
          "Unloaded",
          "Breakdown",
          "Accident",
          "Arrested",
          "ContainerReceivedToLoading",
          "ContainerOnLoading",
          "ContainerFinishedLoading",
          "ContainerSentFromLoading",
          "ContainerReceivedToUnloading",
          "ContainerOnUnloading",
          "ContainerFinishedUnloading",
          "ContainerSentFromUnloading",
          "EmptyContainerReceived",
          "EmptyContainerSent",
          "CompletedByDriver"
        ],
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          100
        ]
      },
      "DealKinds": {
        "type": "integer",
        "description": "Тип Заказа\n            \n* `0` — Заказ невозможен \n* `1` — Взятие груза из поиска\n* `2` — Заказ из Торгов\n* `4` — Предложение груза\n* `8` — Из перехвата машин\n* `16` — Односторонний заказ\n* `32` — Предложение груза из встречного предложения\n* `64` — Предложение груза по контракту\n* `128` — Создан вручную для тестирования черновиков\n* `256` — Создан из АТИ-Доков",
        "x-enumFlags": true,
        "x-enumNames": [
          "None",
          "OrdinaryDeal",
          "AuctionDeal",
          "PersonalDeal",
          "TruckInterDeal",
          "UnilateralDeal",
          "CounterOfferDeal",
          "ContractDeal",
          "DraftDeal",
          "AtiDocumentDeal"
        ],
        "enum": [
          0,
          1,
          2,
          4,
          8,
          16,
          32,
          64,
          128,
          256
        ]
      },
      "OrderRole": {
        "type": "integer",
        "description": "Роль\n\n* `0` — Грузовладелец\n* `1` — Перевозчик",
        "x-enumNames": [
          "CargoOwner",
          "Carrier"
        ],
        "enum": [
          0,
          1
        ]
      },
      "Scan": {
        "type": "object",
        "description": "Скан документа ТС или водителя",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "ID ",
            "format": "guid"
          },
          "owner_id": {
            "type": "string",
            "description": "ID сущности, котрой принадлежит скан",
            "format": "guid",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Название",
            "nullable": true
          },
          "file_id": {
            "type": "string",
            "description": "ID файла",
            "nullable": true
          },
          "type": {
            "description": "Тип документа\n            \n* `1` — Скан водительского удостоверения\n* `2` — Скан гражданского паспорта\n* `3` — Скан ПТС\n* `4` — Скан пластикового ПТС\n* `5` — Фото ТС\n* `8` — Договор о безвоздмездном пользовании",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/AutoparkDocumentType"
              }
            ]
          }
        }
      },
      "AutoparkDocumentType": {
        "type": "integer",
        "description": "Тип документа сущности каталогов\n            \n* `1` — Скан водительского удостоверения\n* `2` — Скан гражданского паспорта\n* `3` — Скан ПТС\n* `4` — Скан пластикового ПТС\n* `6` — Скан договора аренды\n* `5` — Фото ТС\n* `8` — Договор о безвоздмездном пользовании",
        "x-enumNames": [
          "DriverLicense",
          "Passport",
          "TechPassport",
          "PlasticTechPassport",
          "TruckPhoto",
          "RentContract",
          "FreeUse"
        ],
        "enum": [
          1,
          2,
          3,
          4,
          5,
          6,
          8
        ]
      },
      "TrackerOfferStatus": {
        "type": "integer",
        "description": "",
        "x-enumNames": [
          "None",
          "Sent",
          "AcceptedByDriver",
          "RejectedByDriver"
        ],
        "enum": [
          0,
          1,
          2,
          3
        ]
      },
      "DriverOrigin": {
        "type": "integer",
        "description": "Идентификатор источника информации о водителе\n            \n* `0` — Неизвестно откуда указан водитель\n* `1` — Водитель указан на странице заказов у Заказа в исполнении\n* `2` — Водитель указан в АТИ-Доках",
        "x-enumNames": [
          "Unknown",
          "OrdersUiFromDealInProgress",
          "AtiDocs"
        ],
        "enum": [
          0,
          1,
          2
        ]
      },
      "TruckType": {
        "type": "integer",
        "description": "Тип транспортного средства\n            \n* `1` — Грузовик\n* `2` — Тягач\n* `4` — Полуприцеп\n* `8` — Прицеп",
        "x-enumNames": [
          "Truck",
          "Tractor",
          "Semitrailer",
          "Trailer"
        ],
        "enum": [
          1,
          2,
          4,
          8
        ]
      },
      "TruckOwnershipType": {
        "type": "integer",
        "description": "Тип владения ТС\n            \n* `0` - Собственное\n* `1` - Привлеченное\n* `2` - Аренда\n* `3` - Лизинг\n* `4` - Совместная собственность (супругов)\n* `5` - Безвозмездное пользование",
        "x-enumNames": [
          "Own",
          "Attracted",
          "Rent",
          "Leasing",
          "JointOwnershipSpouses",
          "FreeUse"
        ],
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5
        ]
      },
      "TruckOrigin": {
        "type": "integer",
        "description": "Источник создания Транспорта\n            \n* `0` — Неизвестно откуда указано ТС\n* `1` — ТС указано на странице заказов у Заказа в исполнении\n* `2` — ТС Указано в АТИ-доках",
        "x-enumNames": [
          "Unknown",
          "OrdersUiFromDealInProgress",
          "ATIDocs"
        ],
        "enum": [
          0,
          1,
          2
        ]
      },
      "FinalExceptionModelOfFinalException": {
        "type": "object",
        "description": "Модель ошибки",
        "additionalProperties": false,
        "properties": {
          "reason": {
            "type": "string",
            "description": "Причина ошибки"
          },
          "error": {
            "type": "string",
            "description": "Ключ ошибки"
          }
        }
      },
      "DealDocumentTemplateAccess": {
        "type": "integer",
        "description": "Доступ к файлу\n            \n* `0` — только загрузивший файл\n* `1` — обе стороны",
        "x-enumFlags": true,
        "x-enumNames": [
          "OnlyYou",
          "SharedWithCounterparty"
        ],
        "enum": [
          0,
          1
        ]
      },
      "ContactPerson2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Контактное лицо",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Телефон контактного лица",
            "nullable": true
          },
          "ordinal_id": {
            "type": "integer",
            "description": "Порядковый номер добавления контактного лица (от 1 до 10)",
            "format": "int32",
            "example": 1
          }
        }
      },
      "DocumentStatusInfoView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "checked": {
            "type": "boolean",
            "description": "Документ получен"
          },
          "date": {
            "type": "string",
            "description": "Дата получения документов",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "DocumentTrackingInfoView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "transport_company_id": {
            "type": "integer",
            "description": "Id транспортной компании, осуществляющей доставку документов",
            "format": "int32"
          },
          "tracking_url": {
            "type": "string",
            "description": "Сссылка для отслеживания статуса отправления",
            "nullable": true
          },
          "tracking_number": {
            "type": "string",
            "description": "Номер отправления",
            "nullable": true
          },
          "sending_date": {
            "type": "string",
            "description": "Дата отправки документов",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "PaymentStatusView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "checked": {
            "type": "boolean",
            "description": "Заказ оплачен"
          },
          "date": {
            "type": "string",
            "description": "Дата оплаты",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "CustomerView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "ati_id": {
            "type": "string",
            "description": "ID заказчика в ATI. Если заказчик является внешним контрагентом, то будет равняться ID из справочника \"Контрагенты не из АТИ\"",
            "nullable": true
          },
          "source": {
            "description": "Источник информации о заказчике\n\n* `1` - Справочник \"Контрагенты не из АТИ\"\n* `2` - Глобальный поиск\n* `3` - Справочник \"Ваши реквизиты\"",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/CustomerSource"
              }
            ]
          },
          "name": {
            "type": "string",
            "description": "Имя заказчика",
            "nullable": true
          },
          "ownership_id": {
            "type": "integer",
            "description": "ID типа фирмы (ИП/ООО/др.)",
            "format": "int32",
            "nullable": true
          },
          "inn": {
            "type": "string",
            "description": "ИНН\n            ",
            "nullable": true
          },
          "ogrn": {
            "type": "string",
            "description": "ОГРН\n            ",
            "nullable": true
          },
          "requisite": {
            "description": "Реквизиты",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/RequisiteView2"
              }
            ]
          },
          "gen_director": {
            "description": "Генеральный директор",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/GenDirectorView"
              }
            ]
          },
          "contact": {
            "description": "Контакты\n            ",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContactView2"
              }
            ]
          },
          "address": {
            "type": "array",
            "description": "Адрес",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/AddressView"
            }
          },
          "claims_count": {
            "type": "integer",
            "description": "Количество претензий",
            "format": "int32",
            "nullable": true
          },
          "recommendation_count": {
            "type": "integer",
            "description": "Количество рекомендаций",
            "format": "int32",
            "nullable": true
          },
          "bad_partner_firms_count": {
            "type": "integer",
            "description": "Количество фирм, которые написали о данной фирме на форуме Недобросовестных партнеров",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "CustomerSource": {
        "type": "integer",
        "description": "Источник информации о заказчике\n\n* `1` - Справочник \"Контрагенты не из АТИ\"\n* `2` - Глобальный поиск\n* `3` - Справочник \"Ваши реквизиты\"",
        "x-enumNames": [
          "Contractors",
          "GlobalSearch",
          "BillingRequisites"
        ],
        "enum": [
          1,
          2,
          3
        ]
      },
      "RequisiteView2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Наименование реквизитов",
            "nullable": true
          },
          "bank": {
            "type": "string",
            "description": "Наименование банка",
            "nullable": true
          },
          "ks": {
            "type": "string",
            "description": "Корреспондентский счёт",
            "nullable": true
          },
          "registration_number": {
            "type": "string",
            "description": "Регистрационный номер",
            "nullable": true
          },
          "rs": {
            "type": "string",
            "description": "Расчётный счёт",
            "nullable": true
          },
          "bik": {
            "type": "string",
            "description": "БИК",
            "nullable": true
          }
        }
      },
      "GenDirectorView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Имя",
            "nullable": true
          },
          "surname": {
            "type": "string",
            "description": "Фамилия",
            "nullable": true
          },
          "patronymic": {
            "type": "string",
            "description": "Отчество",
            "nullable": true
          },
          "number_phone": {
            "type": "string",
            "description": "Номер телефона",
            "nullable": true
          }
        }
      },
      "ContactView2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Имя контакта",
            "nullable": true
          },
          "surname": {
            "type": "string",
            "description": "Фамилия",
            "nullable": true
          },
          "patronymic": {
            "type": "string",
            "description": "Отчество",
            "nullable": true
          },
          "number_phone": {
            "type": "string",
            "description": "Номер мобильного телефона",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Номер городского телефона",
            "nullable": true
          },
          "messenger_phone": {
            "type": "string",
            "description": "Дополнительный телефон",
            "nullable": true
          },
          "fax": {
            "type": "string",
            "description": "Факс",
            "nullable": true
          },
          "was_modified": {
            "type": "boolean",
            "description": "Флаг редактирования контакта",
            "nullable": true
          },
          "selected_number": {
            "description": "Выбранный номер телефона",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/SelectedNumberView"
              }
            ]
          },
          "is_confirmed": {
            "type": "boolean",
            "description": "Признак подтверждения контакта",
            "nullable": true
          }
        }
      },
      "SelectedNumberView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "string",
            "description": "Телефонный номер",
            "nullable": true
          },
          "country_code": {
            "type": "string",
            "description": "Строковый двузначный код страны выбранного телефонного номера",
            "nullable": true
          }
        }
      },
      "AddressView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "is_legal": {
            "type": "boolean",
            "description": "True - Юридический адрес\nFalse - Фактический адрес"
          },
          "post_index": {
            "type": "string",
            "description": "Почтовый индекс",
            "nullable": true
          },
          "city_id": {
            "type": "integer",
            "description": "ID Города",
            "format": "int32",
            "nullable": true
          },
          "street_name": {
            "type": "string",
            "description": "Название улицы",
            "nullable": true
          },
          "house": {
            "type": "string",
            "description": "Номер дома",
            "nullable": true
          },
          "entrance": {
            "type": "string",
            "description": "Вход",
            "nullable": true
          },
          "litera": {
            "type": "string",
            "description": "Литера/корпус",
            "nullable": true
          },
          "office_no": {
            "type": "string",
            "description": "Номер офиса",
            "nullable": true
          },
          "recipient_full_name": {
            "type": "string",
            "description": "ФИО Получателя",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "Комментарий",
            "nullable": true
          },
          "region_id": {
            "type": "integer",
            "description": "ID региона",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "ChangeDriverDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "deal_id": {
            "type": "string",
            "description": "Идентификатор Заказа",
            "format": "guid"
          },
          "driver_id": {
            "type": "string",
            "description": "Идентификатор нового водителя",
            "format": "guid"
          }
        }
      },
      "ChangeTruckDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "deal_id": {
            "type": "string",
            "description": "Идентификатор Заказа",
            "format": "guid"
          },
          "truck_id": {
            "type": "string",
            "description": "Идентификатор Грузовика или Тягача",
            "format": "guid",
            "nullable": true
          },
          "trailer_id": {
            "type": "string",
            "description": "Идентификатор Прицепа",
            "format": "guid",
            "nullable": true
          },
          "semitrailer_id": {
            "type": "string",
            "description": "Идентификатор Полуприцепа",
            "format": "guid",
            "nullable": true
          }
        }
      },
      "ChangeRateDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "deal_id": {
            "type": "string",
            "description": "Идентификатор Заказа",
            "format": "guid",
            "nullable": true,
            "example": "B3803262-B6BE-47C1-83AB-613DEEEFDCBC"
          },
          "rate": {
            "type": "number",
            "description": "Размер ставки",
            "format": "decimal",
            "nullable": true,
            "example": 100000
          },
          "currency_id": {
            "type": "integer",
            "description": "Id валюты из [словаря валют АТИ](https://ati.su/developers/api/dictionaries/cargoes/#get-v1.0-dictionaries-currencyTypes)",
            "format": "int32",
            "nullable": true,
            "example": 1
          },
          "rate_type_id": {
            "type": "integer",
            "description": "Тип оплаты. 1 - наличные, 2 - с НДС, 3 - без НДС",
            "format": "int32",
            "nullable": true,
            "example": 1
          },
          "on_card": {
            "type": "boolean",
            "description": "Возможность отправлять наличные на карту"
          }
        }
      },
      "PayDocsDto2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "documents_copies": {
            "description": "Информация о копиях документов",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DocumentStatusInfoDto"
              }
            ]
          },
          "documents_original": {
            "description": "Информация об оригиналах документов",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DocumentStatusInfoDto"
              }
            ]
          },
          "documents_original_track": {
            "description": "Информация об отслеживании отправки оригиналов документов (Только для Перевозчика)",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DocumentTrackingInfoDto"
              }
            ]
          },
          "closing_documents": {
            "description": "Информация о закрывающих документах (Только для Перевозчика)",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DocumentStatusInfoDto"
              }
            ]
          },
          "payment": {
            "description": "Информация об оплате",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentStatusDto2"
              }
            ]
          }
        }
      },
      "DocumentStatusInfoDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "checked": {
            "type": "boolean",
            "description": "Документ получен"
          },
          "date": {
            "type": "string",
            "description": "Дата получения документов",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "DocumentTrackingInfoDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "transport_company_id": {
            "type": "integer",
            "description": "ID транспортной компании, осуществляющей доставку документов",
            "format": "int32"
          },
          "tracking_url": {
            "type": "string",
            "description": "Сссылка для отслеживания статуса отправления",
            "nullable": true
          },
          "tracking_number": {
            "type": "string",
            "description": "Номер отправления"
          },
          "sending_date": {
            "type": "string",
            "description": "Дата отправки документов",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "PaymentStatusDto2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "checked": {
            "type": "boolean",
            "description": "Заказ оплачен"
          },
          "date": {
            "type": "string",
            "description": "Дата оплаты",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "WeightType": {
        "type": "integer",
        "description": "Тип веса груза\n            \n* `0` — Килограммы\n* `1` — Тонны",
        "x-enumNames": [
          "Kilos",
          "Tons"
        ],
        "enum": [
          0,
          1
        ]
      },
      "UnilateralOrderViewOfFullDealView": {
        "type": "object",
        "description": "Груз и связанный заказ",
        "additionalProperties": false,
        "properties": {
          "load_copy": {
            "description": "Груз",
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoadCopyView"
              }
            ]
          },
          "deal": {
            "description": "Заказ",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/FullDealView"
              }
            ]
          }
        }
      },
      "LoadCopyView": {
        "type": "object",
        "description": "Копия груза\n\n*При взятии груз копируется, копия не отображается в поиске и её невозможно отредактировать*",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "Id копии груза ",
            "format": "guid"
          },
          "load_number": {
            "type": "string",
            "description": "Сгенерированный номер груза"
          },
          "load_meta": {
            "$ref": "#/components/schemas/LoadMeta"
          },
          "auction_id": {
            "type": "string",
            "description": "Id Торгов (аукциона)",
            "format": "guid",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "description": "Дата последнего изменения груза",
            "format": "date-time"
          },
          "added_at": {
            "type": "string",
            "description": "Дата добавления груза",
            "format": "date-time"
          },
          "archive_date": {
            "type": "string",
            "description": "Дата помещения груза в архив\n\n*При взятии груза, он попадает в архив*",
            "format": "date-time",
            "nullable": true
          },
          "distance": {
            "type": "integer",
            "description": "Расстояние для груза\n            \n*При расчете учитываются дополнительные пункты разгрузки*",
            "format": "int32"
          },
          "distance_type": {
            "type": "integer",
            "description": "Маршрут построен с проездом по МКАД или без МКАД\n            \n* `0` — без МКАД\n* `1` — с МКАД",
            "format": "int32"
          },
          "platon_roads_length": {
            "type": "integer",
            "description": "Расстояние по Платону",
            "format": "int32"
          },
          "toll_roads_length": {
            "type": "integer",
            "description": "Расстояние по платным дорогам",
            "format": "int32"
          },
          "travel_time": {
            "type": "string",
            "description": "Время в пути",
            "format": "duration"
          },
          "true_price": {
            "type": "integer",
            "description": "Озвученная ставка",
            "format": "int32"
          },
          "true_currency_id": {
            "type": "integer",
            "description": "Id валюты озвученной ставки",
            "format": "int32"
          },
          "parent_id": {
            "type": "string",
            "description": "Id груза",
            "format": "guid",
            "nullable": true
          },
          "is_unpublished": {
            "type": "boolean",
            "description": "Груз не опубликован"
          },
          "firm_id": {
            "type": "integer",
            "description": "ID фирмы, выставившей груз",
            "format": "int32"
          },
          "contact_id1": {
            "type": "integer",
            "description": "Контакт #1, указанный в грузе",
            "format": "int32"
          },
          "contact_id2": {
            "type": "integer",
            "description": "Контакт #2, указанный в грузе",
            "format": "int32",
            "nullable": true
          },
          "note": {
            "type": "string",
            "description": "Примечание к грузу"
          },
          "first_date": {
            "type": "string",
            "description": "Дата, начиная с которой груз актуален",
            "format": "date-time"
          },
          "last_date": {
            "type": "string",
            "description": "Дата, после которой груз не актуален",
            "format": "date-time"
          },
          "date_type": {
            "$ref": "#/components/schemas/DateType"
          },
          "periodicity_id": {
            "$ref": "#/components/schemas/Periodicity"
          },
          "order_number": {
            "type": "string",
            "description": "Номер груза/заказа"
          },
          "krugoreis": {
            "type": "boolean",
            "description": "Кругорейс"
          },
          "zimnik": {
            "type": "boolean",
            "description": "Зимники"
          },
          "ferries": {
            "type": "boolean",
            "description": "Паромные переправы"
          },
          "loading": {
            "description": "Точка загрузки",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoadPointView"
              }
            ]
          },
          "extra_points": {
            "type": "array",
            "description": "Дополнительные точки ",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/LoadExtraPointView2"
            }
          },
          "unloading": {
            "description": "Точка разгрузки",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoadPointView"
              }
            ]
          },
          "cargo": {
            "description": "Параметры груза",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoadCargoView"
              }
            ]
          },
          "transport": {
            "description": "Параметры перевозки",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoadTransportView2"
              }
            ]
          },
          "boards": {
            "type": "array",
            "description": "Площадки, на которых опубликован груз",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/BoardView"
            }
          },
          "unload_first_date": {
            "type": "string",
            "description": "Дата, начиная с которой можно разгрузить груз",
            "format": "date-time",
            "nullable": true
          },
          "unload_last_date": {
            "type": "string",
            "description": "Дата, до которой можно разгрузить груз",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "LoadPointView": {
        "type": "object",
        "description": "Точка маршрута груза",
        "additionalProperties": false,
        "properties": {
          "fias_id": {
            "type": "string",
            "description": "Id точки по базе ФИАС",
            "format": "guid"
          },
          "city_id": {
            "type": "integer",
            "description": "Id города\\\nЗначение из [словаря городов АТИ](https://ati.su/developers/api/dictionaries/geo/) ",
            "format": "int32"
          },
          "latitude": {
            "type": "number",
            "description": "Широта",
            "format": "decimal",
            "nullable": true
          },
          "longitude": {
            "type": "number",
            "description": "Долгота",
            "format": "decimal",
            "nullable": true
          },
          "street": {
            "type": "string",
            "description": "Адрес",
            "nullable": true
          },
          "organization_id": {
            "type": "string",
            "description": "Id из справочника организаций",
            "format": "guid",
            "nullable": true
          },
          "address_id": {
            "type": "string",
            "description": "Id адреса в организации",
            "format": "guid",
            "nullable": true
          },
          "time_start": {
            "type": "string",
            "description": "Время \"От\"",
            "format": "date-time",
            "nullable": true
          },
          "time_end": {
            "type": "string",
            "description": "Время \"До\"",
            "format": "date-time",
            "nullable": true
          },
          "is_round_the_clock": {
            "type": "boolean",
            "description": "Круглосуточно"
          },
          "large_cities": {
            "type": "array",
            "description": "Список Id ближайших крупных городов",
            "nullable": true,
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "large_cities_with_distance": {
            "type": "array",
            "description": "Расстояния до ближайших крупных городов",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/LargeCityWithDistance"
            }
          },
          "loading_cargos": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/LoadingCargo"
            }
          },
          "organization": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Organization"
              }
            ]
          }
        }
      },
      "LoadExtraPointView2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "route_point_id": {
            "type": "string",
            "format": "guid"
          },
          "id": {
            "type": "string",
            "format": "guid"
          },
          "city_id": {
            "type": "integer",
            "description": "Id города\\\nЗначение из [словаря городов АТИ](https://ati.su/developers/api/dictionaries/geo/) ",
            "format": "int32"
          },
          "point_type": {
            "$ref": "#/components/schemas/LoadExtraPointType"
          },
          "ordinal_id": {
            "type": "integer",
            "description": "Порядковый номер в маршруте",
            "format": "int32"
          },
          "distance": {
            "type": "integer",
            "description": "Расстояние",
            "format": "int32"
          },
          "street": {
            "type": "string",
            "description": "Адрес",
            "nullable": true
          },
          "latitude": {
            "type": "number",
            "description": "Широта",
            "format": "decimal",
            "nullable": true
          },
          "longitude": {
            "type": "number",
            "description": "Долгота",
            "format": "decimal",
            "nullable": true
          },
          "organization_id": {
            "type": "string",
            "description": "Id из справочника организаций",
            "format": "guid",
            "nullable": true
          },
          "address_id": {
            "type": "string",
            "description": "Id адреса в организации",
            "format": "guid",
            "nullable": true
          },
          "loading_date_start": {
            "type": "string",
            "description": "Дата начала  загрузки",
            "format": "date-time",
            "nullable": true
          },
          "loading_date_end": {
            "type": "string",
            "description": "Дата конца загрузки",
            "format": "date-time",
            "nullable": true
          },
          "loading_time_start": {
            "type": "string",
            "description": "Время начала загрузки",
            "format": "duration",
            "nullable": true
          },
          "loading_time_end": {
            "type": "string",
            "description": "Время конца загрузки",
            "format": "duration",
            "nullable": true
          },
          "is_round_the_clock": {
            "type": "boolean",
            "description": "Круглосуточно"
          },
          "city_name": {
            "type": "string",
            "nullable": true
          },
          "loading_cargos": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/LoadingCargo"
            }
          },
          "unloading_cargos": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/UnloadingCargo"
            }
          },
          "organization": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/Organization"
              }
            ]
          }
        }
      },
      "LoadCargoView": {
        "type": "object",
        "description": "Параметры груза",
        "additionalProperties": false,
        "properties": {
          "weight": {
            "type": "number",
            "description": "Вес",
            "format": "double"
          },
          "volume": {
            "type": "number",
            "description": "Объем",
            "format": "double"
          },
          "adr": {
            "type": "integer",
            "description": "Модификатор опасности груза с 0 до 9",
            "format": "int32"
          },
          "cargo_type_id": {
            "type": "integer",
            "description": "Идентификатор наименования груза\nЗначение из [словаря наименований грузов](https://ati.su/developers/api/dictionaries/cargoes/#get-v1.0-dictionaries-cargoTypes)",
            "format": "int32"
          },
          "cargo_type": {
            "type": "string",
            "description": "Строковое наименование груза. Выводится если CargoTypeId не указан, либо равен `59`",
            "default": "",
            "nullable": true
          },
          "pack_type": {
            "type": "integer",
            "description": "Тип упаковки(навалом, коробки, россыпью, запаллечен ... пирамида). Значение из словаря PackTypes",
            "format": "int32"
          },
          "pallet_count": {
            "type": "integer",
            "description": "Количество паллетов",
            "format": "int32"
          },
          "belt_count": {
            "type": "integer",
            "description": "Количество ремней",
            "format": "int32"
          },
          "dogruz_type": {
            "$ref": "#/components/schemas/DogruzType"
          },
          "sbor_gruz": {
            "type": "boolean",
            "description": "Сборный груз"
          },
          "size": {
            "description": "Размеры груза",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoadSize"
              }
            ]
          }
        }
      },
      "LoadTransportView2": {
        "type": "object",
        "description": "Параметры перевозки",
        "additionalProperties": false,
        "properties": {
          "car_type": {
            "type": "integer",
            "description": "Битовая сумма кузовов",
            "format": "int64"
          },
          "car_type_string": {
            "type": "string",
            "nullable": true
          },
          "loading_type": {
            "type": "integer",
            "description": "Битовая сумма типов загрузки",
            "format": "int32"
          },
          "loading_logical_operator": {
            "type": "string",
            "description": "Тип условия загрузки\n\n* `OR`\n* `AND`",
            "nullable": true
          },
          "unloading_type": {
            "type": "integer",
            "description": "Битовая сумма типов разгрузки",
            "format": "int32"
          },
          "unloading_logical_operator": {
            "type": "string",
            "description": "Тип условия разгрузки\n            \n* `OR`\n* `AND`",
            "nullable": true
          },
          "trucks_quantity": {
            "type": "integer",
            "description": "Количество машин",
            "format": "int32"
          },
          "temperature_from": {
            "type": "integer",
            "description": "Температура перевозки - нижнее значение",
            "format": "int32",
            "nullable": true
          },
          "temperature_to": {
            "type": "integer",
            "description": "Температура перевозки - верхнее значение",
            "format": "int32",
            "nullable": true
          },
          "truck_attribs": {
            "type": "integer",
            "description": "Настройки для машины, используются только в RMQ (Stsepka, Pnevmohod, Koniki)",
            "format": "int32",
            "nullable": true
          },
          "stsepka": {
            "type": "boolean",
            "description": "Сцепка"
          },
          "pnevmohod": {
            "type": "boolean",
            "description": "Пневмоход"
          },
          "koniki": {
            "type": "boolean",
            "description": "Коники"
          },
          "tir": {
            "type": "boolean",
            "description": "TIR"
          },
          "cmr": {
            "type": "boolean",
            "description": "CMR"
          },
          "t1": {
            "type": "boolean",
            "description": "Т1"
          },
          "san_passport": {
            "type": "boolean",
            "description": "Мед книжка"
          },
          "sanitation_logbook": {
            "type": "boolean",
            "description": "Сан. книжка"
          },
          "is_tracking": {
            "type": "boolean",
            "description": "Запрос отслеживания через АТИ Водитель"
          },
          "required_capacity": {
            "type": "number",
            "description": "Требуемая грузоподъёмность в тоннах",
            "format": "decimal",
            "nullable": true
          }
        }
      },
      "BoardView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "board_id": {
            "type": "string",
            "description": "Id площадки"
          },
          "name": {
            "type": "string",
            "description": "Имя площадки"
          },
          "color": {
            "type": "string",
            "description": "Цвет площадки"
          }
        }
      },
      "FullDealView": {
        "allOf": [
          {
            "$ref": "#/components/schemas/DealView3"
          },
          {
            "type": "object",
            "description": "Заказ\n            \n*Основная информация о Заказе*",
            "additionalProperties": false,
            "properties": {
              "started_at": {
                "type": "string",
                "description": "Дата взятия/резервирования груза",
                "format": "date-time",
                "nullable": true
              },
              "finished_at": {
                "type": "string",
                "description": "Дата завершения заказа",
                "format": "date-time",
                "nullable": true
              },
              "denial_reason": {
                "type": "string",
                "description": "Причина отклонения заказа\n            \n*Присутствует когда Status `-2` или `-3`*"
              },
              "requisite_id": {
                "type": "string",
                "description": "Id реквизитов\\\nсм. taker_requisites, в новой версии API это поле перестанет существовать",
                "format": "guid",
                "deprecated": true,
                "nullable": true
              },
              "taker_requisites": {
                "description": "Реквизиты перевозчика",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RequisiteView3"
                  }
                ]
              },
              "signer_id": {
                "type": "string",
                "description": "Id подписанта\\\nсм. taker_requisites, в новой версии API это поле перестанет существовать",
                "format": "guid",
                "deprecated": true,
                "nullable": true
              },
              "driver": {
                "description": "Копия водителя\n            \n*При взятии груза, водитель копируется, копию редактировать невозможно*",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/DriverView2"
                  }
                ]
              },
              "truck": {
                "description": "Копия транспортного средства\n            \n*При взятии груза, транспортное средство копируется, копию редактировать невозможно*",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/TruckView2"
                  }
                ]
              },
              "trailer": {
                "description": "Копия прицепа\n            \n*При взятии груза, прицеп копируется, копию редактировать невозможно*",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/TruckView2"
                  }
                ]
              },
              "semi_trailer": {
                "description": "Копия полуприцепа\n            \n*При взятии груза, полуприцеп копируется, копию редактировать невозможно*",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/TruckView2"
                  }
                ]
              },
              "document": {
                "description": "Основной документ в АТИ-Доках",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/DocumentView"
                  }
                ]
              },
              "additional_documents": {
                "type": "array",
                "description": "Дополнительные документы",
                "items": {
                  "$ref": "#/components/schemas/AdditionalDocumentView"
                }
              },
              "in_work_status_model": {
                "description": "Статусная модель перевозки\n            \n* `0` — Простая перевозка\n* `1` — Первая миля\n* `2` — Последняя миля\n* `3` — Порожний контейнер",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/InWorkStatusModel"
                  }
                ]
              },
              "in_work": {
                "description": "Статус перевозки заказа",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/DealInWorkView3"
                  }
                ]
              },
              "deal_note": {
                "type": "string",
                "description": "Предлагаемые правки к документу"
              },
              "deal_kind": {
                "$ref": "#/components/schemas/DealKinds"
              },
              "points": {
                "type": "array",
                "description": "Точки маршрута",
                "items": {
                  "$ref": "#/components/schemas/DealPointView3"
                }
              }
            }
          }
        ]
      },
      "RequisiteView3": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "requisite_id": {
            "type": "string",
            "description": "Id реквизитов\\\nБолее подробную информацию о реквизитах можно посмотреть [здесь](https://ati.su/developers/api/firms/#firms-requisites)",
            "format": "guid",
            "nullable": true
          },
          "requisite_firm_name": {
            "type": "string",
            "description": "Название компании"
          },
          "signer_id": {
            "type": "string",
            "description": "Id подписанта",
            "format": "guid",
            "nullable": true
          },
          "own_ship_id": {
            "type": "integer",
            "description": "Идентификатор формы собственности\\\nЗначение из [словаря ОПФ АТИ](https://ati.su/developers/api/dictionaries/firms/#get-v1.0-dictionaries-ownerships/) ",
            "format": "int32"
          },
          "inn": {
            "type": "string",
            "description": "ИНН"
          },
          "kpp": {
            "type": "string",
            "description": "КПП",
            "nullable": true
          },
          "requisite_type_id": {
            "type": "integer",
            "description": "Тип реквизитов",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "DriverView2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "driver_id": {
            "type": "string",
            "description": "Id копии водителя",
            "format": "guid"
          },
          "parent_id": {
            "type": "string",
            "description": "Идентификатор водителя из [Справочника Водителей](/api/catalogs/#водители)",
            "format": "guid",
            "nullable": true
          },
          "first_name": {
            "type": "string",
            "description": "Имя водителя"
          },
          "second_name": {
            "type": "string",
            "description": "Фамилия водителя"
          },
          "patronymic": {
            "type": "string",
            "description": "Отчество водителя"
          },
          "phone_number": {
            "type": "string",
            "description": "Номер телефона"
          },
          "driver_license_number": {
            "type": "string",
            "description": "Номер водительского удостоверения"
          },
          "passport_series": {
            "type": "string",
            "description": "Серия паспорта"
          },
          "passport_number": {
            "type": "string",
            "description": "Номер паспорта"
          },
          "passport_issued_by": {
            "type": "string",
            "description": "Кем выдан"
          },
          "passport_when_issued": {
            "type": "string",
            "description": "Когда выдан",
            "format": "date-time"
          },
          "registration": {
            "type": "string",
            "description": "Прописка"
          },
          "is_attracted_driver": {
            "type": "boolean",
            "description": "Флаг привлеченного водителя (со стороны)"
          },
          "last_deal_related_id": {
            "type": "string",
            "description": "Id связанной сущности по Заказу",
            "format": "guid",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Краткое описание водителя"
          },
          "attracted_from": {
            "type": "string",
            "description": "Фирма от которой привлечен водитель."
          },
          "scans": {
            "type": "array",
            "description": "Сканы паспорта / водительского удостоверения",
            "items": {
              "$ref": "#/components/schemas/Scan"
            }
          },
          "origin": {
            "description": "Идентификатор источника информации о водителе\n            \n* `0` — Неизвестно откуда указан водитель\n* `1` — Водитель указан на странице заказов у Заказа в исполнении\n* `2` — Водитель указан в АТИ-Доках",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DriverOrigin"
              }
            ]
          },
          "date_of_birth": {
            "type": "string",
            "description": "Дата рождения",
            "format": "date-time",
            "nullable": true
          },
          "department_code_in_passport": {
            "type": "string",
            "description": "Код подразделения"
          },
          "driver_inn": {
            "type": "string",
            "description": "ИНН водителя"
          },
          "in_cargo_owner_black_list": {
            "type": "boolean",
            "description": "Есть в Черном списке"
          },
          "external_id": {
            "type": "string",
            "description": "Внешний идентификатор"
          },
          "black_list_reasons": {
            "type": "array",
            "description": "Причины добавления в Черный список",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "TruckView2": {
        "type": "object",
        "description": "Транспортное средство",
        "additionalProperties": false,
        "properties": {
          "truck_id": {
            "type": "string",
            "description": "Id копии транспортного средства",
            "format": "guid"
          },
          "parent_id": {
            "type": "string",
            "description": "Id транспортного средства из [Автопарка](/api/catalogs/#автопарк)",
            "format": "guid",
            "nullable": true
          },
          "last_deal_related_id": {
            "type": "string",
            "description": "Id ТС, с которым было связано ТС во время выполнения последнего Заказа",
            "format": "guid",
            "nullable": true
          },
          "type": {
            "description": "Тип транспортного средства\n            \n* `1` — Грузовик\n* `2` — Тягач\n* `4` — Полуприцеп\n* `8` — Прицеп",
            "oneOf": [
              {
                "$ref": "#/components/schemas/TruckType"
              }
            ]
          },
          "description": {
            "type": "string",
            "description": "Описание транспортного средства"
          },
          "brand_id": {
            "type": "integer",
            "description": "Марка",
            "format": "int32",
            "nullable": true
          },
          "model": {
            "type": "string",
            "description": "Модель"
          },
          "number": {
            "type": "string",
            "description": "Номер"
          },
          "phone_number": {
            "type": "string",
            "description": "Телефон"
          },
          "is_attracted_truck": {
            "type": "boolean",
            "description": "Привлеченное ТС"
          },
          "ownership_type": {
            "description": "Тип владения ТС\n            \n* `0` - Собственное\n* `1` - Привлеченное\n* `2` - Аренда\n* `3` - Лизинг\n* `4` - Совместная собственность (супругов)\n* `5` - Безвозмездное пользование",
            "oneOf": [
              {
                "$ref": "#/components/schemas/TruckOwnershipType"
              }
            ]
          },
          "car_type_id": {
            "type": "integer",
            "description": "Тип Кузова",
            "format": "int32"
          },
          "capacity": {
            "type": "number",
            "description": "Грузоподъемность",
            "format": "decimal",
            "nullable": true
          },
          "volume": {
            "type": "number",
            "description": "Объем",
            "format": "decimal",
            "nullable": true
          },
          "length": {
            "type": "number",
            "description": "Длина",
            "format": "decimal",
            "nullable": true
          },
          "width": {
            "type": "number",
            "description": "Ширина",
            "format": "decimal",
            "nullable": true
          },
          "height": {
            "type": "number",
            "description": "Высота",
            "format": "decimal",
            "nullable": true
          },
          "manufacture_year": {
            "type": "integer",
            "description": "Год выпуска",
            "format": "int32",
            "nullable": true
          },
          "vin": {
            "type": "string",
            "description": "VIN"
          },
          "vrc": {
            "type": "string",
            "description": "СТС"
          },
          "body_number": {
            "type": "string",
            "description": "Номер кузова"
          },
          "dimension": {
            "type": "integer",
            "description": "Размерность контейнера",
            "format": "int32",
            "nullable": true
          },
          "truck_passport_number": {
            "type": "string",
            "description": "Номер ПТС"
          },
          "can_refrigerator": {
            "type": "boolean",
            "description": "Способность возить реф-контейнеры",
            "nullable": true
          },
          "has_gen_set": {
            "type": "boolean",
            "description": "Есть GenSet",
            "nullable": true
          },
          "truck_owner_name": {
            "type": "string",
            "description": "Имя владельца по СТС"
          },
          "can_carry_heavy_container": {
            "type": "boolean",
            "description": "Способность перевозить тяжелые контейнеры\n ",
            "nullable": true
          },
          "can_carry_tall_container": {
            "type": "boolean",
            "description": "Способность перевозить высокие контейнеры",
            "nullable": true
          },
          "external_id": {
            "type": "string",
            "description": "Внешний идентификатор"
          },
          "verified": {
            "type": "boolean",
            "description": "Проверено"
          },
          "modification_restricted": {
            "type": "boolean",
            "description": "Запрещено редактирование и удаление ТС."
          },
          "scans": {
            "type": "array",
            "description": "Сканы ПТС",
            "items": {
              "$ref": "#/components/schemas/Scan"
            }
          },
          "origin": {
            "description": "Источник создания Транспорта\n            \n* `0` — Неизвестно откуда указано ТС\n* `1` — ТС указано на странице заказов у Заказа в исполнении\n* `2` — ТС Указано в АТИ-доках",
            "oneOf": [
              {
                "$ref": "#/components/schemas/TruckOrigin"
              }
            ]
          }
        }
      },
      "DocumentView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "ID документа"
          },
          "old_id": {
            "type": "string",
            "description": "ID старого документа"
          },
          "editor": {
            "type": "string",
            "description": "Фирма, отредактировавшая документ"
          },
          "url": {
            "type": "string",
            "description": "Адрес просмотра договора"
          },
          "old_url": {
            "type": "string",
            "description": "Адрес просмотра старого договора"
          },
          "name": {
            "type": "string",
            "description": "Имя документа"
          },
          "is_signed": {
            "type": "boolean",
            "description": "Документ подписан перевозчиком"
          },
          "access": {
            "description": "Доступ к документу\n            \n* `0` — Обе стороны\n* `1` — Водитель",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DealDocumentAccess"
              }
            ]
          }
        }
      },
      "AdditionalDocumentView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "Id документа"
          },
          "is_counterparty_file": {
            "type": "boolean",
            "description": "Файл контрагента"
          },
          "url": {
            "type": "string",
            "description": "Адрес документа"
          },
          "name": {
            "type": "string",
            "description": "Имя документа"
          },
          "is_signed": {
            "type": "boolean",
            "description": "Документ подписан перевозчиком"
          },
          "document_type": {
            "description": "Тип документа\n            \n* `0` — Нет\n* `1` — Заказ\n* `2` — Договор-заявка\n* `3` — Поручение экспедитору\n* `4` — Акт\n* `5` — Счет\n* `6` — Одностороннее расторжение\n* `7` — Доверенность\n* `8` — Табличный заказ\n* `9` — Заявка к договору (табличный вид)",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DocumentType"
              }
            ]
          },
          "access": {
            "description": "Доступ к документу\n            \n* `0` — Обе стороны\n* `1` — Водитель",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DealDocumentAccess"
              }
            ]
          }
        }
      },
      "DealInWorkView3": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "deal_id": {
            "type": "string",
            "description": "Id Заказа",
            "format": "guid"
          },
          "in_work_status": {
            "description": "Статус перевозки\n            \n* `0` — Нет статуса\n* `1` — Едет на загрузку\n* `2` — Ожидает загрузку\n* `3` — Загружается\n* `4` — Загрузился, едет на выгрузку\n* `5` — Ожидает выгрузку\n* `6` — Выгружается\n* `7` — Выгрузился\n* `8` — Поломка\n* `9` — ДТП\n* `10` — Арест ТС\n* `11` — Контейнер получен на погрузку\n* `12` — Контейнер на погрузке\n* `13` — Погрузка контейнера окончена\n* `14` — Контейнер сдан с погрузки\n* `15` — Контейнер получен на выгрузку\n* `16` — Контейнер на выгрузке\n* `17` — Выгрузка контейнера окончена\n* `18` — Контейнер сдан с выгрузки\n* `19` — Пустой контейнер получен\n* `20` — Пустой контейнер сдан",
            "oneOf": [
              {
                "$ref": "#/components/schemas/InWorkStatus"
              }
            ]
          },
          "in_work_date": {
            "type": "string",
            "description": "Дата выставления статуса",
            "format": "date-time",
            "nullable": true
          },
          "ati_id": {
            "type": "string",
            "description": "Фирма, выставившая статус (перевозчик или грузовладелец)",
            "nullable": true
          },
          "contact_id": {
            "type": "integer",
            "description": "Контакт, выставивший статус",
            "format": "int32",
            "nullable": true
          },
          "tracker_phone": {
            "type": "number",
            "description": "Номер телефона трекера, откуда получен статус",
            "format": "decimal",
            "nullable": true
          }
        }
      },
      "DealPointView3": {
        "type": "object",
        "description": "Точка маршрута заказа",
        "additionalProperties": false,
        "properties": {
          "deal_point_id": {
            "type": "string",
            "description": "Id точки заказа",
            "format": "guid"
          },
          "ordinal_id": {
            "type": "integer",
            "description": "Порядковый номер",
            "format": "int32"
          },
          "point_type": {
            "description": "Тип точки маршрута\n            \n* `1` — Загрузка\n* `2` — Разгрузка",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DealPointTypes"
              }
            ]
          },
          "city_id": {
            "type": "integer",
            "description": "Id города\\\nЗначение из [словаря городов АТИ](https://ati.su/developers/api/dictionaries/geo/) ",
            "format": "int32"
          },
          "lat": {
            "type": "number",
            "description": "Широта",
            "format": "double",
            "nullable": true
          },
          "lon": {
            "type": "number",
            "description": "Долгота",
            "format": "double",
            "nullable": true
          },
          "address": {
            "type": "string",
            "description": "Адрес",
            "nullable": true
          },
          "participant_name": {
            "type": "string",
            "description": "Название организации",
            "nullable": true
          },
          "region_id": {
            "type": "integer",
            "description": "Id региона\nЗначение из [словаря регионов АТИ](https://ati.su/developers/api/dictionaries/geo/) ",
            "format": "int32"
          },
          "contact_name": {
            "type": "string",
            "nullable": true
          },
          "organization_id": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "stock_id": {
            "type": "string",
            "format": "guid",
            "nullable": true
          },
          "stock": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/PointStockDocView2"
              }
            ]
          },
          "organization": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/OrganizationView2"
              }
            ]
          }
        }
      },
      "PointStockDocView2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "stock_id": {
            "type": "string",
            "format": "guid"
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "address_city_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "contact_persons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactPersonView2"
            }
          },
          "schedule_summary": {
            "type": "string",
            "nullable": true
          },
          "stock_type": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/StockType"
              }
            ]
          },
          "timeslots_warehouse_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "ContactPersonView2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "contact_person_id": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        }
      },
      "OrganizationView2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "organization_id": {
            "type": "string",
            "format": "guid"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "contact_persons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContactPersonView2"
            }
          }
        }
      },
      "DealView3": {
        "type": "object",
        "description": "Заказ\n            \n*Основная информация о Заказе*",
        "additionalProperties": false,
        "properties": {
          "deal_id": {
            "type": "string",
            "description": "Id Заказа",
            "format": "guid"
          },
          "load_copy_id": {
            "type": "string",
            "description": "Id связанной копии груза",
            "format": "guid"
          },
          "load_id": {
            "type": "string",
            "description": "Id груза",
            "format": "guid"
          },
          "taker_ati_id": {
            "type": "string",
            "description": "Код фирмы, взявшей груз"
          },
          "taker_persistent_user_id": {
            "type": "integer",
            "description": "Идентификатор пользователя, взявшего груз",
            "format": "int32"
          },
          "taker_contact_id": {
            "type": "integer",
            "description": "Id контакта, взявшего груз",
            "format": "int32"
          },
          "cargo_owner_ati_id": {
            "type": "string",
            "description": "Код фирмы опубликовавшей груз"
          },
          "cargo_owner_persistent_user_id": {
            "type": "integer",
            "description": "Идентификатор пользователя, опубликовавшего груз",
            "format": "int32"
          },
          "updated_at": {
            "type": "string",
            "description": "Время изменения информации по Заказу",
            "format": "date-time"
          },
          "end_of_reservation": {
            "type": "string",
            "description": "Время до которого груз зарезервирован",
            "format": "date-time",
            "nullable": true
          },
          "auction_id": {
            "type": "string",
            "description": "Id Торгов (аукциона)",
            "format": "guid",
            "nullable": true
          },
          "status": {
            "description": "Статус Заказа\n\n* `0` — Груз зарезервирован перевозчиком\n* `1` — Перевозчик заполнил информацию о реквизитах/водителе/машине и грузовладелец не просмотрел заявку\n* `2` — Перевозчик заполнил информацию о реквизитах/водителе/машине и грузовладелец просмотрел заявку\n* `3` — Грузовладелец отправил документ-заявку перевозчику\n* `4` — Заказ в исполнении (перевозчик дал согласие на документ-заявку)\n* `5` — Заказ завершен и перенесен в архив\n* `7` — Есть только приглашение на Заказ\n* `8` — Заказа нет, но есть Торги, у которых есть возможные победители\n* `9` — Заказ отклонен автоматически, так как после последней даты загрузки прошло уже более 7 дней\n* `10` — Заказ завершен, ожидается оплата\n* `11` — В Торгах лучшая ставка из других Торгов\n* `-11` — Заказ удален\n* `-10` — Резерв груза перевозчиком отменен\n* `-9` — Заказ отклонен грузовладельцем в Торгах после истечения срока подачи документов (смена победителя)\n* `-8` — Грузовладелец отменил Заказ в исполнении\n* `-7` — Перевозчик отменил Заказ в исполнении\n* `-6` — Заказ отклонен грузовладельцем после удаления Торгов\n* `-4` — Заказ отклонен грузовладельцем в Торгах (смена победителя)\n* `-3` — Заказ отклонен грузовладельцем\n* `-2` — Заказ отозван перевозчиком",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DealState"
              }
            ]
          },
          "counterparty_status": {
            "description": "Статус Заказа у контрагента\n\n* `0` — Груз зарезервирован перевозчиком\n* `1` — Перевозчик заполнил информацию о реквизитах/водителе/машине и грузовладелец не просмотрел заявку\n* `2` — Перевозчик заполнил информацию о реквизитах/водителе/машине и грузовладелец просмотрел заявку\n* `3` — Грузовладелец отправил документ-заявку перевозчику\n* `4` — Заказ в исполнении (перевозчик дал согласие на документ-заявку)\n* `5` — Заказ завершен и перенесен в архив\n* `7` — Есть только приглашение на Заказ\n* `8` — Заказа нет, но есть Торги, у которых есть возможные победители\n* `9` — Заказ отклонен автоматически, так как после последней даты загрузки прошло уже более 7 дней\n* `10` — Заказ завершен, ожидается оплата\n* `11` — В Торгах лучшая ставка из других Торгов\n* `-11` — Заказ удален\n* `-10` — Резерв груза перевозчиком отменен\n* `-9` — Заказ отклонен грузовладельцем в Торгах после истечения срока подачи документов (смена победителя)\n* `-8` — Грузовладелец отменил Заказ в исполнении\n* `-7` — Перевозчик отменил Заказ в исполнении\n* `-6` — Заказ отклонен грузовладельцем после удаления Торгов\n* `-4` — Заказ отклонен грузовладельцем в Торгах (смена победителя)\n* `-3` — Заказ отклонен грузовладельцем\n* `-2` — Заказ отозван перевозчиком",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DealState"
              }
            ]
          },
          "payment": {
            "description": "Параметры оплаты Заказа",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DealPaymentView3"
              }
            ]
          },
          "pay_docs": {
            "description": "Информация об оплате заказа",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PayDocsView2"
              }
            ]
          },
          "files": {
            "type": "array",
            "description": "Файлы Заказа",
            "items": {
              "$ref": "#/components/schemas/DealFileView2"
            }
          },
          "document_templates": {
            "type": "array",
            "description": "Информация о шаблонах документов в заказах",
            "items": {
              "$ref": "#/components/schemas/DealDocumentTemplatesView"
            }
          },
          "customer": {
            "description": "Информация о заказчике",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/CustomerView"
              }
            ]
          },
          "is_tracking": {
            "type": "boolean",
            "description": "Запрос отслеживания через АТИ Водитель"
          },
          "should_show_rate_to_driver": {
            "type": "boolean",
            "description": "Показывать ли ставку водителю (для ОЗ)",
            "nullable": true
          }
        }
      },
      "DealPaymentView3": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "rates": {
            "type": "array",
            "description": "Список возможных ставок перевозки",
            "items": {
              "$ref": "#/components/schemas/RateView2"
            }
          },
          "prepay_percent": {
            "type": "integer",
            "description": "Процент предоплаты",
            "format": "int32"
          },
          "prepay_percent_enabled": {
            "type": "boolean",
            "description": "Есть ли предоплата"
          },
          "on_unloading": {
            "type": "boolean",
            "description": "Оплата на выгрузке"
          },
          "in_fuel": {
            "type": "boolean",
            "description": "Оплата топливом"
          },
          "pay_days_enabled": {
            "type": "boolean",
            "description": "Есть ли срок оплаты"
          },
          "pay_days": {
            "type": "integer",
            "description": "Срок оплаты",
            "format": "int32"
          },
          "fixed_rate": {
            "type": "boolean",
            "description": "Указана ли в грузе ставка"
          },
          "torg": {
            "type": "boolean",
            "description": "Возможен ли торг"
          },
          "direct_contract": {
            "type": "boolean",
            "description": "Прямой договор"
          },
          "money_type": {
            "type": "integer",
            "description": "Способ оплаты",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "RateView2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "rate": {
            "type": "number",
            "description": "Сумма",
            "format": "decimal",
            "nullable": true
          },
          "rate_type": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/RateType"
              }
            ]
          },
          "currency": {
            "type": "integer",
            "description": "Id валюты",
            "format": "int32",
            "nullable": true
          },
          "active": {
            "type": "boolean",
            "description": "Является ли ставка выбранной"
          }
        }
      },
      "PayDocsView2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "documents_copies": {
            "description": "Информация о копиях документов",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DocumentStatusInfoView"
              }
            ]
          },
          "documents_original": {
            "description": "Информация о оригиналах документов",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DocumentStatusInfoView"
              }
            ]
          },
          "documents_original_track": {
            "description": "Информация об отслеживании оригиналов документов",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DocumentTrackingInfoView"
              }
            ]
          },
          "payment": {
            "description": "Информация об оплате",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentStatusView"
              }
            ]
          }
        }
      },
      "DealFileView2": {
        "type": "object",
        "description": "Файлы заказа",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "Id файла",
            "format": "guid",
            "nullable": true
          },
          "storage_file_id": {
            "type": "string",
            "description": "Id файла в хранилище",
            "nullable": true
          },
          "access": {
            "description": "Доступ к файлу\n            \n* `0` — только загрузивший файл\n* `1` — обе стороны\n* `2` — загрузивший файл и водитель\n* `3` — доступен обеим сторонам и водителю",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/DealFileAccess"
              }
            ]
          },
          "add_date": {
            "type": "string",
            "description": "Время загрузки файла",
            "format": "date-time",
            "nullable": true
          },
          "deal_id": {
            "type": "string",
            "description": "Id связанного Заказа",
            "format": "guid"
          },
          "is_counterparty_file": {
            "type": "boolean",
            "description": "Файл контрагента"
          },
          "file_name": {
            "type": "string",
            "description": "Имя файла",
            "nullable": true
          },
          "size": {
            "type": "integer",
            "description": "Размер файла",
            "format": "int32"
          },
          "link": {
            "type": "string",
            "description": "Ссылка на файл",
            "nullable": true
          },
          "file_id": {
            "type": "string",
            "description": "ID файла",
            "nullable": true
          },
          "source_type": {
            "description": "Источник файла\n            \n* `0` — Загружен в заказ\n* `1` — Скопирован из груза\n* `2` — Скопирован из данных о водителе\n* `3` — Скопироване из данных о грузовике\n* `4` — Скопирован из данных о прицепе\n* `5` — Скопирован из данных о полуприцепе\n* `6` — Скопирован из данных о тягаче\n* `7` — Загружен для Ати-водителя",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DealFileSourceTypes"
              }
            ]
          },
          "source_file_type": {
            "description": "Тип загруженного файла\n            \n* `0` — Обычный файл\n* `1` — Водительское удостоверение\n* `2` — Паспорт водителя\n* `3` — Техпаспорт ТС\n* `4` — Пластик\n* `5` — Фото ТС",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DealFileSourceFileTypes"
              }
            ]
          },
          "file_type": {
            "description": "Тип файла\n            \n* `0` — Другой документ\n* `1` — Товарно-транспортная накладная\n* `2` — Товарная накладная\n* `3` — Транспортная накладная\n* `4` — Накладная\n* `5` — Счет-фактура\n* `6` — Счет на оплату\n* `7` — Платежное поручение\n* `8` — Акт выполненных работ\n* `9` — Заявка\n* `10` — Заявка (к договору)\n* `11` — Заказ\n* `12` — Договор\n* `13` — Доп. соглашение (к договору)\n* `14` — Доверенность\n* `15` — Поручение экспедитору\n* `16` — Информационное письмо\n* `17` — Документ о происшествии с грузом/ТС",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DealFileType"
              }
            ]
          },
          "timeslots_warehouse_ids": {
            "type": "array",
            "description": "Список складов с Временными окнами с доступом  к файлу",
            "nullable": true,
            "items": {
              "type": "integer",
              "format": "int32"
            }
          }
        }
      },
      "DealDocumentTemplatesView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "organization_address": {
            "type": "string",
            "description": "Адрес организации"
          },
          "templates": {
            "type": "array",
            "description": "Шаблоны документов",
            "items": {
              "$ref": "#/components/schemas/DocumentTemplateView2"
            }
          }
        }
      },
      "DocumentTemplateView2": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "add_date": {
            "type": "string",
            "description": "Время загрузки документа",
            "format": "date-time",
            "nullable": true
          },
          "access": {
            "description": "Доступ к документу\n            \n* `0` — только загрузивший документ\n* `1` — обе стороны",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/DealDocumentTemplateAccess"
              }
            ]
          },
          "timeslots_warehouse_ids": {
            "type": "array",
            "description": "Список складов с Временными окнами с доступом к документу",
            "nullable": true,
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "deal_id": {
            "type": "string",
            "description": "Id связанного Заказа",
            "format": "guid",
            "nullable": true
          },
          "deal_point_id": {
            "type": "string",
            "description": "Id точки в заказе, к которой привязан документ",
            "format": "guid",
            "nullable": true
          },
          "owner_firm_id": {
            "type": "integer",
            "description": "Id фирмы, загрузившей документ",
            "format": "int32",
            "nullable": true
          },
          "cargoes_ids_hash": {
            "type": "integer",
            "description": "Поле-хэш, рассчитывается на основе id грузов, выгружаемых в точке DealPointId. Если выгружаемые грузы не указаны - будет равно 0",
            "format": "int32",
            "nullable": true
          },
          "contact_id": {
            "type": "integer",
            "description": "Id контакта",
            "format": "int32",
            "nullable": true
          },
          "file_name": {
            "type": "string",
            "description": "Название документа",
            "nullable": true
          },
          "file_id": {
            "type": "string",
            "description": "Id файла документа",
            "nullable": true
          },
          "id": {
            "type": "string",
            "description": "Id документа",
            "format": "guid",
            "nullable": true
          },
          "size": {
            "type": "integer",
            "description": "Размер документа",
            "format": "int32",
            "nullable": true
          },
          "link": {
            "type": "string",
            "description": "Ссылка на документ (только для сайта)"
          }
        }
      },
      "SaveUnilateralOrderDtoNew": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "points": {
            "type": "array",
            "description": "Точки маршрута, включая загрузку и разгрузку",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/UnilateralOrderPointDtoInboxNew"
            }
          },
          "driver_id": {
            "type": "string",
            "description": "Идентификатор водителя",
            "format": "guid",
            "nullable": true
          },
          "truck_id": {
            "type": "string",
            "description": "Идентификатор транспорта",
            "format": "guid",
            "nullable": true
          },
          "trailer_id": {
            "type": "string",
            "description": "Идентификатор прицепа",
            "format": "guid",
            "nullable": true
          },
          "semitrailer_id": {
            "type": "string",
            "description": "Идентификатор полуприцепа",
            "format": "guid",
            "nullable": true
          },
          "deal_id": {
            "type": "string",
            "description": "Идентификатор Заказа\n\nУказывается, когда необходимо изменить заказ",
            "format": "guid",
            "nullable": true
          },
          "rate": {
            "type": "number",
            "description": "Ставка\n\nЕсли ставка указана, то должны быть заполнены поля `currency`, `money_type` и `rate_type`",
            "format": "decimal",
            "nullable": true,
            "example": 1000
          },
          "currency": {
            "type": "integer",
            "description": "Идентификатор валюты ставки\n            \nПоле является обязательным, если указана ставка (`rate`)\n\nЗначение из [словаря валют АТИ](https://ati.su/developers/api/dictionaries/cargoes/#get-v1.0-dictionaries-currencyTypes)",
            "format": "int32",
            "nullable": true,
            "example": 1
          },
          "rate_type": {
            "description": "Типы оплаты\n            \nПоле является обязательным, если указана ставка (`rate`)\n\n* `0` — Нет\n* `1` — Любая\n* `2` — С НДС\n* `3` — Без НДС",
            "nullable": true,
            "example": 1,
            "oneOf": [
              {
                "$ref": "#/components/schemas/RateType"
              }
            ]
          },
          "money_type": {
            "type": "integer",
            "description": "Ставка (любая, на карту, нал)\n            \n* `1` — Нал\n* `22` — Любая\n* `23` — На карту\n* `24` — Нал без НДС\n* `25` — Безнал без НДС",
            "format": "int32",
            "nullable": true,
            "example": 1
          },
          "order_number": {
            "type": "string",
            "description": "Номер заказа или груза",
            "nullable": true
          },
          "should_show_rate_to_driver": {
            "type": "boolean",
            "description": "Показывать ли ставку водителю"
          },
          "adr": {
            "type": "integer",
            "description": "Параметр, определяющий степень опасности груза\n            \nВозможны значения с 1 до 9",
            "format": "int32",
            "nullable": true,
            "example": 0
          },
          "loading_type": {
            "type": "integer",
            "description": "Битовая сумма Id типов загрузки ",
            "format": "int32",
            "nullable": true,
            "example": 0
          },
          "unloading_type": {
            "type": "integer",
            "description": "Битовая сумма Id типов разгрузки ",
            "format": "int32",
            "nullable": true,
            "example": 0
          },
          "belt_count": {
            "type": "integer",
            "description": "Кол-во ремней",
            "format": "int32",
            "nullable": true,
            "example": 0
          },
          "file_ids": {
            "type": "array",
            "description": "Список ID файлов",
            "nullable": true,
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UnilateralOrderPointDtoInboxNew": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "city_id",
          "time",
          "lat",
          "lon"
        ],
        "properties": {
          "ordinal_id": {
            "type": "integer",
            "description": "Порядковый номер точки, начиная с 0",
            "format": "int32",
            "example": 0
          },
          "country_id": {
            "type": "integer",
            "description": "Id страны\\\nЗначение из [словаря стран АТИ](https://ati.su/developers/api/dictionaries/geo/) ",
            "format": "int32",
            "example": 1
          },
          "region_id": {
            "type": "integer",
            "description": "Id региона\\\nЗначение из [словаря регионов АТИ](https://ati.su/developers/api/dictionaries/geo/) ",
            "format": "int32",
            "nullable": true,
            "example": 21
          },
          "city_id": {
            "type": "integer",
            "description": "Id города\\\nЗначение из [словаря городов АТИ](https://ati.su/developers/api/dictionaries/geo/) ",
            "format": "int32",
            "example": 60
          },
          "time": {
            "type": "string",
            "description": "Время прибытия (при наличии значения time_to, time означает начало периода времени прибытия)",
            "minLength": 1,
            "example": "10:00"
          },
          "time_to": {
            "type": "string",
            "description": "Время до (если есть)",
            "nullable": true,
            "example": "01:00"
          },
          "date": {
            "type": "string",
            "description": "Дата прибытия (при наличии значения date_to, date означает начало периода дат прибытия) ",
            "nullable": true,
            "example": "02.05.2029"
          },
          "date_to": {
            "type": "string",
            "description": "Дата до (если есть)",
            "nullable": true,
            "example": "13.05.2029"
          },
          "lat": {
            "type": "number",
            "description": "Широта точки",
            "format": "double",
            "example": 56.8256736
          },
          "lon": {
            "type": "number",
            "description": "Долгота точки",
            "format": "double",
            "example": 60.5484352
          },
          "address": {
            "type": "string",
            "description": "Адрес",
            "example": "ул. Ленина"
          },
          "contact_persons": {
            "type": "array",
            "description": "Список контактов (не более 10 контактов)",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ContactPerson2"
            }
          },
          "note": {
            "type": "string",
            "description": "Примечание (до 160 символов)",
            "nullable": true
          },
          "point_type": {
            "description": "Тип точки\n* `1` — Загрузка\n* `2` — Разгрузка\n* `3` — Таможня\n* `8` — Ехать через",
            "example": 1,
            "oneOf": [
              {
                "$ref": "#/components/schemas/UnilateralLoadPointType"
              }
            ]
          },
          "is_round_the_clock": {
            "type": "boolean",
            "description": "Круглосуточная загрузка",
            "example": false
          },
          "cargos": {
            "type": "array",
            "description": "Груз",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/CargoDto"
            }
          }
        }
      },
      "UnilateralLoadPointType": {
        "type": "integer",
        "description": "Тип дополнительной точки маршрута груза\n            \n* `1` — Загрузка\n* `2` — Разгрузка\n* `3` — Таможня\n* `8` — Ехать через",
        "x-enumNames": [
          "LoadingExtraPoint",
          "UnloadingExtraPoint",
          "CustomExtraPoint",
          "GoThrough"
        ],
        "enum": [
          1,
          2,
          3,
          8
        ]
      },
      "CargoDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "cargo_id": {
            "type": "integer",
            "description": "Id груза",
            "format": "int32",
            "example": 0
          },
          "name_id": {
            "type": "integer",
            "description": "ID наименования груза",
            "format": "int32",
            "nullable": true,
            "example": 59
          },
          "name": {
            "type": "string",
            "description": "Наименование груза",
            "nullable": true
          },
          "packaging_type": {
            "type": "integer",
            "description": "Упаковка",
            "format": "int32",
            "nullable": true,
            "example": 0
          },
          "packaging_quantity": {
            "type": "integer",
            "description": "Кол-во упаковок",
            "format": "int32",
            "nullable": true,
            "example": 10
          },
          "weight": {
            "description": "Вес",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/CargoWeight"
              }
            ]
          },
          "volume": {
            "type": "number",
            "description": "Объем",
            "format": "double",
            "nullable": true,
            "example": 10
          },
          "sizes": {
            "description": "Габариты",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoadSizeDto"
              }
            ]
          }
        }
      },
      "CargoWeight": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "quantity": {
            "type": "number",
            "description": "Вес",
            "format": "double",
            "nullable": true,
            "example": 10
          },
          "type": {
            "description": "Тип веса груза\n            \n* `0` — Килограммы\n* `1` — Тонны",
            "nullable": true,
            "example": 0,
            "oneOf": [
              {
                "$ref": "#/components/schemas/WeightType"
              }
            ]
          }
        }
      },
      "LoadSizeDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "length": {
            "type": "number",
            "description": "Длина в метрах",
            "format": "double",
            "nullable": true,
            "example": 0
          },
          "width": {
            "type": "number",
            "description": "Ширина в метрах",
            "format": "double",
            "nullable": true,
            "example": 0
          },
          "height": {
            "type": "number",
            "description": "Высота в метрах",
            "format": "double",
            "nullable": true,
            "example": 0
          },
          "diameter": {
            "type": "number",
            "description": "Диаметр в метрах",
            "format": "double",
            "nullable": true,
            "example": 0
          }
        }
      },
      "OrderViewOfFullDealView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "load_copy": {
            "description": "Копия груза\n\n*При создании заказа груз копируется, копия не отображается в поиске и её невозможно отредактировать*",
            "oneOf": [
              {
                "$ref": "#/components/schemas/LoadCopyView"
              }
            ]
          },
          "deal": {
            "description": "Заказ\n            \n*Основная информация о заказе*",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/FullDealView"
              }
            ]
          }
        }
      },
      "OrderFilter2": {
        "type": "object",
        "description": "Фильтр по заказам",
        "additionalProperties": false,
        "properties": {
          "role": {
            "description": "Роль пользователя, по умолчанию: Грузовладелец\n\n* `0` — Грузовладелец\n* `1` — Перевозчик",
            "oneOf": [
              {
                "$ref": "#/components/schemas/OrderRole"
              }
            ]
          },
          "statuses": {
            "type": "array",
            "description": "Список статусов для фильтрации заказов. Если передать null или пустой список, то вернутся все заказы пользователя\n\n* `0` — Груз зарезервирован перевозчиком\n* `1` — Перевозчик заполнил информацию о реквизитах/водителе/машине и грузовладелец не просмотрел заявку\n* `2` — Перевозчик заполнил информацию о реквизитах/водителе/машине и грузовладелец просмотрел заявку\n* `3` — Грузовладелец отправил документ-заявку перевозчику\n* `4` — Заказ в исполнении (перевозчик дал согласие на документ-заявку)\n* `5` — Заказ завершен и перенесен в архив\n* `7` — Есть только приглашение на Заказ\n* `8` — Заказа нет, но есть Торги, у которых есть возможные победители\n* `9` — Заказ отклонен автоматически, так как после последней даты загрузки прошло уже более 7 дней\n* `10` — Заказ завершен, ожидается оплата\n* `11` — В Торгах лучшая ставка из других Торгов\n* `-11` — Заказ удален\n* `-10` — Резерв груза перевозчиком отменен\n* `-9` — Заказ отклонен грузовладельцем в Торгах после истечения срока подачи документов (смена победителя)\n* `-8` — Грузовладелец отменил Заказ в исполнении\n* `-7` — Перевозчик отменил Заказ в исполнении\n* `-6` — Заказ отклонен грузовладельцем после удаления Торгов\n* `-4` — Заказ отклонен грузовладельцем в Торгах (смена победителя)\n* `-3` — Заказ отклонен грузовладельцем\n* `-2` — Заказ отозван перевозчиком",
            "items": {
              "$ref": "#/components/schemas/DealState"
            }
          },
          "load_ids": {
            "type": "array",
            "description": "Список id грузов",
            "items": {
              "type": "string",
              "format": "guid"
            }
          }
        }
      },
      "DealStatusView": {
        "type": "object",
        "description": "Информация о статусе заказа",
        "additionalProperties": false,
        "properties": {
          "deal_id": {
            "type": "string",
            "description": "Id заказа",
            "format": "guid"
          },
          "status": {
            "$ref": "#/components/schemas/DealState"
          },
          "deal_kind": {
            "$ref": "#/components/schemas/DealKinds"
          },
          "inwork_status": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/InWorkStatus"
              }
            ]
          },
          "tracker_offer_status": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/TrackerOfferStatus"
              }
            ]
          },
          "status_change_date_time": {
            "type": "string",
            "description": "Время изменения статуса",
            "format": "date-time"
          }
        }
      },
      "OrderToWorkDtoInbox": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "in_work_status_model": {
            "description": "Статусная модель перевозки\n            \n* `0` — Простая перевозка\n* `1` — Первая миля\n* `2` — Последняя миля\n* `3` — Порожний контейнер",
            "oneOf": [
              {
                "$ref": "#/components/schemas/InWorkStatusModel"
              }
            ]
          }
        }
      },
      "DocumentInfoShortView": {
        "type": "object",
        "description": "Параметры ссылки для открытия Заказа в АТИ-Доках ",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "description": "Id документа"
          },
          "url": {
            "type": "string",
            "description": "Url документа"
          },
          "is_signed": {
            "type": "boolean",
            "description": "Подписан ли документ"
          }
        }
      },
      "DealAcceptFromLoadIntegratorsDtoInbox": {
        "type": "object",
        "description": "Данные грузовладельца для Заказа",
        "additionalProperties": false,
        "properties": {
          "template_id": {
            "type": "string",
            "description": "Id шаблона документа а АТИ Доках",
            "nullable": true
          },
          "document_type": {
            "type": "string",
            "description": "Тип документа (\"заказ\", \"заказ (табличный вид)\", \"заявка (к договору)\", \"поручение экспедитору\", \"Заявка к договору (табличный вид)\")",
            "nullable": true
          },
          "requisite_id": {
            "type": "string",
            "description": "Id реквизитов",
            "format": "guid",
            "nullable": true
          },
          "signer_id": {
            "type": "string",
            "description": "Id подписанта",
            "format": "guid",
            "nullable": true
          },
          "contract_number": {
            "type": "string",
            "description": "Номер договора произвольного формата не длинее 50 символов. Обязателен, если тип документа -- заявка или поручение экспедитору.",
            "nullable": true
          },
          "contract_start_date": {
            "type": "string",
            "description": "Дата начала договора. Обязателен, если тип документа -- заявка или поручение экспедитору.",
            "format": "date-time",
            "nullable": true
          },
          "point_ids": {
            "type": "array",
            "description": "Список адресов загрузки/разгрузки с организациями для Заказа",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/DealPointIntegratorsDtoInbox"
            }
          }
        }
      },
      "DealPointIntegratorsDtoInbox": {
        "type": "object",
        "description": "Адрес загрузки/разгрузки в Заказе",
        "additionalProperties": false,
        "properties": {
          "deal_point_id": {
            "type": "string",
            "description": "Id адреса загрузки/разгрузки из Заказа",
            "format": "guid"
          },
          "organization_id": {
            "type": "string",
            "description": "Id организации",
            "format": "guid"
          },
          "contact_person_id": {
            "type": "string",
            "description": "Id контакта адреса",
            "format": "guid",
            "nullable": true
          },
          "address_id": {
            "type": "string",
            "description": "Id адреса",
            "format": "guid",
            "nullable": true
          }
        }
      },
      "LoadTakeInfoIntegratorsDto": {
        "type": "object",
        "description": "Параметры Заказа",
        "additionalProperties": false,
        "properties": {
          "rate_type": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/RateType"
              }
            ]
          },
          "driver_id": {
            "type": "string",
            "description": "Id водителя",
            "format": "guid",
            "nullable": true
          },
          "truck_info_id": {
            "type": "string",
            "description": "Id транспортного средства",
            "format": "guid",
            "nullable": true
          },
          "semitrailer_id": {
            "type": "string",
            "description": "Id полуприцепа\n            \n*Может быть указан только если транспортное средство — тягач*",
            "format": "guid",
            "nullable": true
          },
          "trailer_id": {
            "type": "string",
            "description": "Id прицепа\n            \n*Может быть указан только если указан полуприцеп или транспортное средство — грузовик*",
            "format": "guid",
            "nullable": true
          },
          "requisites_id": {
            "type": "string",
            "description": "Id реквизитов",
            "format": "guid",
            "nullable": true
          },
          "signer_id": {
            "type": "string",
            "description": "Id подписанта",
            "format": "guid",
            "nullable": true
          },
          "is_drop_docs": {
            "type": "boolean",
            "description": "Отзывать ли привязанные документы\n            \n*Используется при редактировании*"
          },
          "deal_kind": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/DealKinds"
              }
            ]
          },
          "taker_note": {
            "type": "string",
            "description": "Комментарий перевозчика"
          }
        }
      },
      "ChangeAddressDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "deal_id": {
            "type": "string",
            "description": "Идентификатор Заказа",
            "format": "guid",
            "nullable": true,
            "example": "B3803262-B6BE-47C1-83AB-613DEEEFDCBC"
          },
          "changed": {
            "type": "boolean",
            "description": "Признак изменения",
            "example": false
          },
          "routes": {
            "type": "array",
            "description": "Точки маршрута",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ChangeRouteDto"
            }
          }
        }
      },
      "ChangeRouteDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "ordinal_id": {
            "type": "integer",
            "description": "Порядковый номер точки",
            "format": "int32",
            "example": 1
          },
          "deal_point_id": {
            "type": "string",
            "description": "Id точки",
            "format": "guid",
            "nullable": true,
            "example": "3b4e4312-6fe3-ed11-bb95-0025906a774d"
          },
          "point_type": {
            "description": "Тип точки маршрута\n            \n* `1` — Загрузка\n* `2` — Разгрузка\n* `3` — Таможня\n* `8` — Ехать через",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DealPointTypes"
              }
            ]
          },
          "address": {
            "type": "string",
            "description": "Адрес",
            "nullable": true,
            "example": "улица Пальшиной"
          },
          "city_id": {
            "type": "integer",
            "description": "Id города\\\nЗначение из [словаря городов АТИ](https://ati.su/developers/api/dictionaries/geo/) ",
            "format": "int32",
            "nullable": true,
            "example": 1422
          },
          "latitude": {
            "type": "number",
            "description": "Широта",
            "format": "double",
            "nullable": true,
            "example": 30.3330562
          },
          "longitude": {
            "type": "number",
            "description": "Долгота точки",
            "format": "double",
            "nullable": true,
            "example": 59.974006
          },
          "organization_id": {
            "type": "string",
            "description": "Id организации из справочника ",
            "format": "guid",
            "nullable": true,
            "example": "a7a47bac-c4a5-ec11-bbc4-0cc47af31075"
          },
          "address_id": {
            "type": "string",
            "description": "Id адреса в организации из справочника ",
            "format": "guid",
            "nullable": true,
            "example": "69044dcd-c7a5-ec11-bbc4-0cc47af31075"
          }
        }
      },
      "ChangeDatesDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "deal_id": {
            "type": "string",
            "description": "Идентификатор Заказа",
            "format": "guid",
            "nullable": true,
            "example": "B3803262-B6BE-47C1-83AB-613DEEEFDCBC"
          },
          "loading": {
            "description": "Загрузка",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChangePointDto"
              }
            ]
          },
          "unloading": {
            "description": "Разгрузка",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChangePointDto"
              }
            ]
          },
          "way_points": {
            "type": "object",
            "description": "Точки маршрута (в качестве ключа ordinal_id)",
            "nullable": true,
            "additionalProperties": {
              "nullable": true,
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ChangePointDto"
                }
              ]
            }
          }
        }
      },
      "ChangePointDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "first_date": {
            "description": "Дата начала",
            "example": "2025-09-15",
            "oneOf": [
              {
                "$ref": "#/components/schemas/SettableOfNullableDateTimeOffset"
              }
            ]
          },
          "last_date": {
            "description": "Дата конца",
            "example": "2025-09-16",
            "oneOf": [
              {
                "$ref": "#/components/schemas/SettableOfNullableDateTimeOffset"
              }
            ]
          },
          "time": {
            "description": "Время загрузки ($type: bounded - c-по; round-the-clock - круглосуточно)",
            "oneOf": [
              {
                "$ref": "#/components/schemas/SettableOfChangeTimeDto"
              }
            ]
          }
        }
      },
      "SettableOfNullableDateTimeOffset": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "is_set": {
            "type": "boolean"
          }
        }
      },
      "SettableOfChangeTimeDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "value": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ChangeTimeDto"
              }
            ]
          },
          "is_set": {
            "type": "boolean"
          }
        }
      },
      "ChangeTimeDto": {
        "type": "object",
        "discriminator": {
          "propertyName": "$type",
          "mapping": {
            "bounded": "#/components/schemas/ChangeTimeBoundedDto",
            "round-the-clock": "#/components/schemas/ChangeTimeRoundTheClockDto"
          }
        },
        "x-abstract": true,
        "additionalProperties": false,
        "required": [
          "$type"
        ],
        "properties": {
          "$type": {
            "type": "string"
          }
        }
      },
      "ChangeContactsDto": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "deal_id",
          "contact_id1"
        ],
        "properties": {
          "deal_id": {
            "type": "string",
            "description": "Идентификатор Заказа",
            "format": "guid",
            "minLength": 1,
            "example": "B3803262-B6BE-47C1-83AB-613DEEEFDCBC"
          },
          "contact_id1": {
            "type": "integer",
            "description": "Основной контакт",
            "format": "int32"
          },
          "contact_id2": {
            "type": "integer",
            "description": "Второй контакт",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "ChangeNoteDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "deal_id": {
            "type": "string",
            "description": "Идентификатор Заказа",
            "format": "guid",
            "example": "B3803262-B6BE-47C1-83AB-613DEEEFDCBC"
          },
          "note": {
            "type": "string",
            "description": "Новое значение примечания",
            "nullable": true,
            "example": "Новый текст примечания"
          }
        }
      },
      "DeclineOrderIntegratorsDto": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "reason": {
            "type": "string"
          },
          "action": {
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/FinishActionIntegrators"
              }
            ]
          }
        }
      },
      "FinishActionIntegrators": {
        "type": "integer",
        "description": "Действие после отмены заказа\n* `1` — Восстановить груз\n* `2` — Оставить груз в Архиве (если по грузу есть торги, они отменятся)\n* `3` — Сменить победителя\n* `4` — Перезапустить Торги",
        "x-enumNames": [
          "PublishLoad",
          "DeleteLoad",
          "SelectNewWinner",
          "RestartAuction"
        ],
        "enum": [
          1,
          2,
          3,
          4
        ]
      },
      "SwaggerExampleBaseApiException": {
        "type": "object",
        "properties": {
          "error_code": {
            "type": "string",
            "description": "Код ошибки",
            "nullable": true,
            "example": "validation_error"
          },
          "reason": {
            "type": "string",
            "description": "Описание ошибки для разработчиков",
            "nullable": true,
            "example": "Ошибка валидации полей phone и device_id"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Authorization: Bearer {authorizationToken}"
      }
    }
  }
}