{
  "openapi": "3.0.1",
  "info": {
    "title": "api/orders/ati-driver",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "/"
    },
    {
      "url": "https://api.ati.su"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/v1/driver/public/presence": {
      "post": {
        "tags": [
          "DriverIntegrator"
        ],
        "summary": "Получение информации о наличии пользователя по телефону",
        "description": "Авторизация по токену",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicDriverPresenceRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicDriverPresenceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicDriverPresenceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PublicDriverPresenceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicDriverPresenceResponse"
                  }
                }
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicDriverPresenceResponse"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicDriverPresenceResponse"
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SwaggerExampleBaseApiException"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwaggerExampleBaseApiException"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwaggerExampleBaseApiException"
                }
              }
            }
          }
        }
      }
    },
    "/v1/driver/public/invite": {
      "post": {
        "tags": [
          "UserInfoIntegrator"
        ],
        "summary": "Отправление смс-приглашения с просьбой установить приложение",
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/InviteUserByPhoneRequest"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteUserByPhoneRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/InviteUserByPhoneRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/InviteUserByPhoneRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SmsInviteResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsInviteResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsInviteResponse"
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SwaggerExampleBaseApiException"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwaggerExampleBaseApiException"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwaggerExampleBaseApiException"
                }
              }
            }
          }
        }
      }
    },
    "/gw/driver/v1/carrier/deals/{dealId}/transportations": {
      "get": {
        "tags": [
          "АТИ Водитель"
        ],
        "summary": "Получение информации по заказу для водителя",
        "description": "Возвращает массив точек маршрута, по которым водитель будет следовать, используя приложение АТИ Водитель.\nКаждая точка соответствует загрузке или разгрузке, и также содержит информацию об адресе, географических координатах, дате и времени, контактном лице на точке.",
        "operationId": "Carrier_GetDriverTrackerPoints",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "Id Заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Информация по заказу",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DriverTrackerPointIntegratorsView"
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwaggerExampleBaseApiException"
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      },
      "post": {
        "tags": [
          "АТИ Водитель"
        ],
        "summary": "Назначение заказа на водителя.",
        "description": "Привязывает водителя к заказу, создает информацию, необходимую водителю для использования приложения АТИ Водитель и отправляет ее на приложение.\nВ тело метода включается информация о типе точки (загрузка или разгрузка), а также информация об адресе, географических координатах, дате и времени, контактном лице на точке",
        "operationId": "Carrier_CreateDriverTrackerPoints",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "Id Заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "trackerPoints",
          "description": "Информация о точках маршрута",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/DriverTrackerPointDTO"
                }
              }
            }
          },
          "x-position": 2
        },
        "responses": {
          "200": {
            "description": "Созданная информация по заказу",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DriverTrackerPointIntegratorsView"
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwaggerExampleBaseApiException"
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      },
      "put": {
        "tags": [
          "АТИ Водитель"
        ],
        "summary": "Обновление заказа для АТИ Водителя.",
        "description": "Обновляет информацию, необходимую водителю для использования приложения АТИ Водитель и отправляет ее на приложение.\nВ тело метода включается информация о типе точки (загрузка или разгрузка), а также информация об адресе, географических координатах, дате и времени, контактном лице на точке",
        "operationId": "Carrier_UpdateDriverTrackerPoints",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "Id Заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "trackerPoints",
          "description": "Точки, которые нужно обновить",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "nullable": true,
                "items": {
                  "$ref": "#/components/schemas/DriverTrackerPointDTO"
                }
              }
            }
          },
          "x-position": 2
        },
        "responses": {
          "200": {
            "description": "Созданная информация по заказу",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DriverTrackerPointIntegratorsView"
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwaggerExampleBaseApiException"
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      },
      "delete": {
        "tags": [
          "АТИ Водитель"
        ],
        "summary": "Снятие водителя с заказа.",
        "description": "Отвязывает водителя от заказа и удаляет информацию, созданную при назначении заказа на водителя.",
        "operationId": "Carrier_RevokeDriverTrackerPoints",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "Id Заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Информация по заказу успешно удалена",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwaggerExampleBaseApiException"
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/orders/carrier/map_route/by_deal": {
      "get": {
        "tags": [
          "АТИ Водитель"
        ],
        "summary": "Получение информации о пройденном маршруте АТИ Водителя",
        "description": "Возвращает информацию о маршруте, пройденном водителем с использованием приложения, а также о начальной, конечной и промежуточных точках маршрута.\nОтвет метода можно использовать, например, для отображения маршрута на карте.",
        "operationId": "Carrier_GetRoutedMapInfo",
        "parameters": [
          {
            "name": "deal_id",
            "x-originalName": "dealId",
            "in": "query",
            "description": "Id Заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          },
          {
            "name": "south_west_lat",
            "x-originalName": "southWestLat",
            "in": "query",
            "description": "Широта юго-запад",
            "schema": {
              "type": "number",
              "format": "double"
            },
            "x-position": 2
          },
          {
            "name": "south_west_lng",
            "x-originalName": "southWestLng",
            "in": "query",
            "description": "Долгота юго-запад",
            "schema": {
              "type": "number",
              "format": "double"
            },
            "x-position": 3
          },
          {
            "name": "north_east_lat",
            "x-originalName": "northEastLat",
            "in": "query",
            "description": "Широта северо-восток",
            "schema": {
              "type": "number",
              "format": "double"
            },
            "x-position": 4
          },
          {
            "name": "north_east_lng",
            "x-originalName": "northEastLng",
            "in": "query",
            "description": "Долгота северо-восток",
            "schema": {
              "type": "number",
              "format": "double"
            },
            "x-position": 5
          },
          {
            "name": "zoom",
            "in": "query",
            "description": "Коэффициент масштабирования",
            "schema": {
              "type": "number",
              "format": "double"
            },
            "x-position": 6
          }
        ],
        "responses": {
          "200": {
            "description": "Информация для карты",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DealMapView"
                  }
                }
              }
            }
          },
          "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/carrier/map/history": {
      "get": {
        "tags": [
          "АТИ Водитель"
        ],
        "summary": "Получение истории",
        "description": "Массив событий, произошедших в пути следования водителя. Например: поломка, ДТП.",
        "operationId": "Carrier_GetHistory",
        "parameters": [
          {
            "name": "deal_id",
            "x-originalName": "dealId",
            "in": "query",
            "description": "Id Заказа ",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "История выполнения заказа водителем",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MapHistoryView"
                  }
                }
              }
            }
          },
          "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/carrier/{dealId}/tracker_access": {
      "post": {
        "tags": [
          "АТИ Водитель"
        ],
        "summary": "Установка доступа грузовладельца к данным из АТИ Водителя.",
        "description": "По умолчанию грузовладелец не может следить за водителем на карте.\nС помощью метода можно открывать и закрывать грузовладельцу доступ к этой информации (данные, возвращаемые методом `/map/by_deal`).",
        "operationId": "Carrier_SetTrackerAccess",
        "parameters": [
          {
            "name": "dealId",
            "in": "path",
            "required": true,
            "description": "Id Заказа",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          },
          {
            "name": "value",
            "in": "query",
            "description": "Значение доступа\n            \n* `0` — Запретить доступ\n* `1` — Разрешить доступ",
            "schema": {
              "nullable": true,
              "oneOf": [
                {
                  "$ref": "#/components/schemas/TrackerOwnerAccess"
                }
              ]
            },
            "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/driver/public/deal/users_activity": {
      "post": {
        "tags": [
          "DealIntegrator"
        ],
        "summary": "Получение последних локаций пользователей",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicDriverActivityRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicListDealsDigestResponse"
                }
              }
            }
          },
          "4XX": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SwaggerExampleBaseApiException"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "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
      },
      "PublicDriverPresenceRequest": {
        "type": "object",
        "properties": {
          "phones": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Номера телефонов",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SmsStatus": {
        "enum": [
          "empty",
          "created",
          "error",
          "sent",
          "delivered"
        ],
        "type": "string"
      },
      "PublicSmsInviteStatusResponse": {
        "type": "object",
        "properties": {
          "invite_sent": {
            "type": "boolean"
          },
          "contact_name": {
            "type": "string",
            "nullable": true
          },
          "ati_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "contact_id": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "sms_status": {
            "$ref": "#/components/schemas/SmsStatus"
          },
          "when": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicDriverPresenceResponse": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "nullable": true
          },
          "initial_phone": {
            "type": "string",
            "nullable": true
          },
          "last_active": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "has_tracker": {
            "type": "boolean"
          },
          "sms_invite_status": {
            "$ref": "#/components/schemas/PublicSmsInviteStatusResponse"
          }
        },
        "additionalProperties": false
      },
      "InviteUserByPhoneRequest": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "description": "Номер телефона",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "SmsInviteResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "details": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicDriverActivityDealRequest": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "description": "Номер телефона водителя"
          },
          "deal_id": {
            "type": "string",
            "format": "uuid",
            "description": "Id сделки в формате GUID"
          }
        },
        "additionalProperties": false
      },
      "PublicDealDigestResponse": {
        "type": "object",
        "properties": {
          "deal_id": {
            "type": "string",
            "description": "Id сделки в формате GUID"
          },
          "initial_phone": {
            "type": "string",
            "description": "Номер телефона водителя в изначальном виде"
          },
          "phone": {
            "type": "string",
            "description": "Отформатированный номер телефона водителя"
          },
          "tracker_offer_status": {
            "$ref": "#/components/schemas/TrackerOfferStatus"
          },
          "reason_changing_offer_status": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/DealInWorkStatus"
          },
          "extended_status": {
            "$ref": "#/components/schemas/ExtendedDealInWorkStatus"
          },
          "tracker_finished_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Дата и время завершения перевозки водителем"
          },
          "last_active": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Дата и время когда водитель последний раз заходил в приложение"
          },
          "has_tracker": {
            "type": "boolean",
            "description": "Установлено ли приложение у водителя"
          },
          "last_location": {
            "$ref": "#/components/schemas/PointResponse"
          },
          "gps_status_date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicListDealsDigestResponse": {
        "type": "object",
        "properties": {
          "deals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicDealDigestResponse"
            }
          }
        },
        "additionalProperties": false
      },
      "PublicDriverActivityRequest": {
        "type": "object",
        "properties": {
          "deals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicDriverActivityDealRequest"
            }
          }
        },
        "additionalProperties": false
      },
      "TrackerOfferStatus": {
        "enum": [
          "none",
          "sent",
          "accepted_by_driver",
          "rejected_by_driver"
        ],
        "type": "string"
      },
      "DealInWorkStatus": {
        "enum": [
          "none",
          "go_to_loading",
          "ready_to_load",
          "loading",
          "loaded",
          "ready_to_unload",
          "unloading",
          "unloaded",
          "breakdown",
          "accident",
          "arrest",
          "container_received_to_loading",
          "container_on_loading",
          "container_finished_loading",
          "container_sent_from_loading",
          "container_received_to_unloading",
          "container_on_unloading",
          "container_finished_unloading",
          "container_sent_from_unloading",
          "empty_container_received",
          "empty_container_sent"
        ],
        "type": "string"
      },
      "ExtendedDealInWorkStatus": {
        "enum": [
          "none",
          "completed_by_driver"
        ],
        "type": "string"
      },
      "PointResponse": {
        "type": "object",
        "properties": {
          "lon": {
            "type": "number",
            "format": "double"
          },
          "lat": {
            "type": "number",
            "format": "double"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventResponse"
            },
            "nullable": true
          },
          "is_fake": {
            "type": "boolean"
          },
          "is_disabled": {
            "type": "boolean"
          },
          "is_no_data": {
            "type": "boolean"
          },
          "is_power_saving": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "EventResponse": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/EventType"
          },
          "tag": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "date_to": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "time": {
            "type": "string",
            "nullable": true
          },
          "time_to": {
            "type": "string",
            "nullable": true
          },
          "location_name": {
            "$ref": "#/components/schemas/LocationNameResponse"
          },
          "company_info": {
            "$ref": "#/components/schemas/CompanyInfoResponse"
          }
        },
        "additionalProperties": false
      },
      "EventType": {
        "enum": [
          "not_set",
          "meta",
          "status",
          "photo",
          "other"
        ],
        "type": "string"
      },
      "LocationNameResponse": {
        "type": "object",
        "properties": {
          "country": {
            "type": "string",
            "nullable": true
          },
          "region": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CompanyInfoResponse": {
        "type": "object",
        "properties": {
          "ati_id": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DriverTrackerPointIntegratorsView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "deal_point_id": {
            "type": "string",
            "description": "Id точки из Заказа",
            "format": "guid",
            "example": "2fb965f2-85e9-4213-90e7-f396e47219e7"
          },
          "ordinal_id": {
            "type": "integer",
            "description": "Порядковый номер точки",
            "format": "int32",
            "example": 1
          },
          "time": {
            "type": "string",
            "description": "Время",
            "nullable": true,
            "example": "10:00"
          },
          "date": {
            "type": "string",
            "description": "Дата",
            "nullable": true,
            "example": "2.1.2019"
          },
          "time_to": {
            "type": "string",
            "description": "Время до (если есть)",
            "nullable": true,
            "example": "1:00"
          },
          "date_to": {
            "type": "string",
            "description": "Дата до (если есть)",
            "nullable": true,
            "example": "13.2.2019"
          },
          "lat": {
            "type": "number",
            "description": "Широта точки",
            "format": "double",
            "nullable": true,
            "example": 30.3330562
          },
          "lon": {
            "type": "number",
            "description": "Долгота точки",
            "format": "double",
            "nullable": true,
            "example": 59.974006
          },
          "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
          },
          "region_id": {
            "type": "integer",
            "description": "Id региона\\\nЗначение из [словаря регионов АТИ](https://ati.su/developers/api/dictionaries/geo/) ",
            "format": "int32",
            "nullable": true
          },
          "country_id": {
            "type": "integer",
            "description": "Id страны\\\nЗначение из [словаря стран АТИ](https://ati.su/developers/api/dictionaries/geo/) ",
            "format": "int32",
            "nullable": true
          },
          "point_type": {
            "description": "Тип точки\n            \n* `1` — Загрузка\n* `2` — Разгрузка",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DealPointTypes"
              }
            ]
          },
          "contact_persons": {
            "type": "array",
            "description": "Список контактов (не более 10 контактов)",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ContactPerson2"
            }
          },
          "note": {
            "type": "string",
            "description": "Примечание (до 1000 символов)",
            "nullable": true
          },
          "timeslots_warehouse_id": {
            "type": "integer",
            "description": "Айди склада из временных окон",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "DriverTrackerPointDTO": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "deal_point_id"
        ],
        "properties": {
          "deal_point_id": {
            "type": "string",
            "description": "Id точки из Заказа",
            "format": "guid",
            "minLength": 1,
            "example": "2fb965f2-85e9-4213-90e7-f396e47219e7"
          },
          "time": {
            "type": "string",
            "description": "Время",
            "nullable": true,
            "example": "10:00"
          },
          "date": {
            "type": "string",
            "description": "Дата",
            "nullable": true,
            "example": "02.01.2019"
          },
          "time_to": {
            "type": "string",
            "description": "Время до (если есть)",
            "nullable": true,
            "example": "01:00"
          },
          "date_to": {
            "type": "string",
            "description": "Дата до (если есть)",
            "nullable": true,
            "example": "13.02.2019"
          },
          "lat": {
            "type": "number",
            "description": "Широта точки",
            "format": "double",
            "nullable": true,
            "example": 30.3330562
          },
          "lon": {
            "type": "number",
            "description": "Долгота точки",
            "format": "double",
            "nullable": true,
            "example": 59.974006
          },
          "address": {
            "type": "string",
            "description": "Адрес",
            "nullable": true,
            "example": "гор. Санкт-Петербург"
          },
          "contact_persons": {
            "type": "array",
            "description": "Список контактов (не более 10 контактов)",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/ContactPerson2"
            }
          },
          "note": {
            "type": "string",
            "description": "Примечание (до 1000 символов)",
            "nullable": true
          },
          "timeslots_warehouse_id": {
            "type": "integer",
            "description": "Айди склада из временных окон",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "DealPointTypes": {
        "type": "integer",
        "description": "Тип точки маршрута\n            \n* `1` — Загрузка\n* `2` — Разгрузка\n* `3` — Таможня\n* `8` — Ехать через",
        "x-enumNames": [
          "Loading",
          "Unloading",
          "Customs",
          "GoThrough"
        ],
        "enum": [
          1,
          2,
          3,
          8
        ]
      },
      "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
          }
        }
      },
      "TrackerOwnerAccess": {
        "type": "integer",
        "description": "",
        "x-enumNames": [
          "Hide",
          "Show"
        ],
        "enum": [
          0,
          1
        ]
      },
      "MapCarType": {
        "type": "integer",
        "description": "",
        "x-enumNames": [
          "Ok",
          "GpsDisabled",
          "GpsSpoof",
          "NoData",
          "PowerSaving",
          "Parking"
        ],
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5
        ]
      },
      "FinalExceptionModelOfFinalException": {
        "type": "object",
        "description": "Модель ошибки",
        "additionalProperties": false,
        "properties": {
          "reason": {
            "type": "string",
            "description": "Причина ошибки"
          },
          "error": {
            "type": "string",
            "description": "Ключ ошибки"
          }
        }
      },
      "DealMapView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "goals": {
            "type": "array",
            "description": "Точки загрузки/разгрузки",
            "items": {
              "$ref": "#/components/schemas/GoalView"
            }
          },
          "traces": {
            "type": "array",
            "description": "Точки траектории движения водителя",
            "items": {
              "$ref": "#/components/schemas/TraceView"
            }
          }
        }
      },
      "GoalView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "longitude": {
            "type": "number",
            "description": "Долгота",
            "format": "double"
          },
          "latitude": {
            "type": "number",
            "description": "Широта",
            "format": "double"
          },
          "events": {
            "type": "array",
            "description": "События",
            "items": {
              "$ref": "#/components/schemas/EventView"
            }
          },
          "ordinal_id": {
            "type": "integer",
            "description": "Номер по порядку",
            "format": "int32"
          },
          "trace": {
            "type": "boolean",
            "description": "Нужно ли прокладывать маршрут для этой точки"
          }
        }
      },
      "EventView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "description": "Тип события\n\n* `0` — Значение по умолчанию\n* `1` — Метаинформация об устройстве. Включает в себя события выключения GPS, подмены GPS координат, выключения телефона.\n* `2` — Информация о статусе заказа (статусы выбираются водителем в приложении)",
            "oneOf": [
              {
                "$ref": "#/components/schemas/TrackerEventType"
              }
            ]
          },
          "tag": {
            "type": "string",
            "description": "Тэг произошедшего события"
          },
          "date": {
            "type": "string",
            "description": "Дата начала",
            "format": "date-time"
          },
          "date_to": {
            "type": "string",
            "description": "Дата окончания",
            "format": "date-time",
            "nullable": true
          },
          "time": {
            "type": "string",
            "description": "Время начала"
          },
          "time_to": {
            "type": "string",
            "description": "Время окончания"
          },
          "location_name": {
            "description": "Информация о местоположении",
            "oneOf": [
              {
                "$ref": "#/components/schemas/LocationNameView"
              }
            ]
          }
        }
      },
      "TrackerEventType": {
        "type": "integer",
        "description": "",
        "x-enumNames": [
          "NotSet",
          "Meta",
          "Status"
        ],
        "enum": [
          0,
          1,
          2
        ]
      },
      "LocationNameView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "country": {
            "type": "string",
            "description": "Страна"
          },
          "region": {
            "type": "string",
            "description": "Регион"
          },
          "city": {
            "type": "string",
            "description": "Город"
          },
          "address": {
            "type": "string",
            "description": "Адрес"
          }
        }
      },
      "TraceView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "car": {
            "description": "Транспортное средство",
            "oneOf": [
              {
                "$ref": "#/components/schemas/CarView"
              }
            ]
          },
          "first_action": {
            "type": "string",
            "description": "Время начала действия",
            "format": "date-time"
          },
          "last_action": {
            "type": "string",
            "description": "Время окончания действия",
            "format": "date-time"
          },
          "points": {
            "type": "array",
            "description": "Точки маршрута",
            "items": {
              "$ref": "#/components/schemas/PointView"
            }
          }
        }
      },
      "CarView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "driver_phone": {
            "type": "string",
            "description": "Номер телефона водителя"
          },
          "car_status": {
            "description": "Тип события\n            \n* `0` — Без происшествий\n* `1` — GPS был выключен\n* `2` — Попытка подделки GPS\n* `3` — Не было данных\n* `4` — Режим энергосбережения\n* `5` — Стоянка",
            "oneOf": [
              {
                "$ref": "#/components/schemas/MapCarType"
              }
            ]
          }
        }
      },
      "PointView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "longitude": {
            "type": "number",
            "description": "Долгота",
            "format": "double"
          },
          "latitude": {
            "type": "number",
            "description": "Широта",
            "format": "double"
          },
          "events": {
            "type": "array",
            "description": "События",
            "items": {
              "$ref": "#/components/schemas/EventView"
            }
          },
          "location_date": {
            "type": "string",
            "description": "Время местоположения",
            "format": "date-time"
          },
          "is_fake": {
            "type": "boolean",
            "description": "Флаг поддельного сигнала GPS"
          },
          "is_disabled": {
            "type": "boolean",
            "description": "Фдаг выключенности GPS"
          },
          "is_no_data": {
            "type": "boolean",
            "description": "Флаг наличия данных"
          },
          "is_power_saving": {
            "type": "boolean",
            "description": "Флаг включенности режима энергосбережения"
          },
          "is_empty_run": {
            "type": "boolean",
            "description": "Флаг холостого хода"
          },
          "is_parking": {
            "type": "boolean",
            "description": "Стоянка"
          }
        }
      },
      "MapHistoryView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "events": {
            "type": "array",
            "description": "События в пути",
            "items": {
              "$ref": "#/components/schemas/UserDealsHistoryView"
            }
          }
        }
      },
      "UserDealsHistoryView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "date": {
            "type": "string",
            "description": "Время события",
            "format": "date-time"
          },
          "event": {
            "description": "Событие",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EventView"
              }
            ]
          },
          "longitude": {
            "type": "number",
            "description": "Долгота",
            "format": "double"
          },
          "latitude": {
            "type": "number",
            "description": "Широта",
            "format": "double"
          },
          "params": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Authorization: Bearer {authorizationToken}"
      }
    }
  }
}