{
  "openapi": "3.0.1",
  "info": {
    "title": "Службы доставки: API",
    "contact": {
      "name": "Support Team",
      "email": "admin@selsup.ru"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://selsup.ru/dogovor-offerta/"
    },
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.selsup.ru/",
      "description": "Production server"
    }
  ],
  "tags": [
    {
      "name": "Доставка",
      "description": "Методы для работы с интеграциями со службами доставки"
    }
  ],
  "paths": {
    "/api/delivery/updateDeliveryOrder": {
      "post": {
        "tags": [
          "Доставка"
        ],
        "summary": "Обновление статуса из сервиса доставки",
        "operationId": "updateDeliveryOrder",
        "parameters": [
          {
            "name": "orderId",
            "in": "query",
            "description": "Идентификатор заказа",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Идентификатор заказа"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/delivery/storeWarehouseDelivery": {
      "post": {
        "tags": [
          "Доставка"
        ],
        "summary": "Сохранить пункт доставки со склада",
        "operationId": "storeWarehouseDelivery",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WarehouseDelivery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/WarehouseDelivery"
                }
              }
            }
          }
        }
      }
    },
    "/api/delivery/removeWarehouseDelivery": {
      "post": {
        "tags": [
          "Доставка"
        ],
        "summary": "Удалить пункт доставки со склада",
        "operationId": "removeWarehouseDelivery",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WarehouseDelivery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/delivery/order/{orderId}": {
      "post": {
        "tags": [
          "Доставка"
        ],
        "summary": "Создание заказа в сервисе доставки",
        "description": "Позволяет создать заказ в службе доставки из заказа SelSup. При этом в заказе должен быть проставлен пункт доставки",
        "operationId": "order",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "Идентификатор заказа",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Идентификатор заказа"
            }
          },
          {
            "name": "service",
            "in": "query",
            "description": "Сервис доставки",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Сервис доставки"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "string",
                "description": "Тариф для доставки"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/delivery/getTariffs": {
      "post": {
        "tags": [
          "Доставка"
        ],
        "summary": "Список доступных тарифов для заказа",
        "operationId": "getTariffs",
        "parameters": [
          {
            "name": "service",
            "in": "query",
            "description": "Сервис доставки",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Сервис доставки"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "description": "Идентификатор заказа",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Идентификатор заказа"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeliveryTariff"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/delivery/downloadDeliveryLabels": {
      "post": {
        "tags": [
          "Доставка"
        ],
        "summary": "Скачивает PDF файл со всеми накладными службы доставки",
        "operationId": "downloadDeliveryLabels",
        "parameters": [
          {
            "name": "actual",
            "in": "query",
            "description": "Отображать только актуальные заказы - не закрытые",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Отображать только актуальные заказы - не закрытые"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Тип заказа",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Тип заказа"
            }
          },
          {
            "name": "organizations",
            "in": "query",
            "required": false,
            "schema": {
              "uniqueItems": true,
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          {
            "name": "query",
            "in": "query",
            "description": "Поисковый запрос для фильтрации заказов по номеру или названию",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Поисковый запрос для фильтрации заказов по номеру или названию"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "service",
            "in": "query",
            "description": "Фильтр заказа по маркетплейсу",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр заказа по маркетплейсу"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Фильтр по статусу заказа",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр по статусу заказа"
            }
          },
          {
            "name": "statuses",
            "in": "query",
            "description": "Фильтр по статусам заказа",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр по статусам заказа"
            }
          },
          {
            "name": "withoutSupply",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "orderProductId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "productId",
            "in": "query",
            "description": "Фильтр по товару из заказа",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр по товару из заказа"
            }
          },
          {
            "name": "hasCollectTask",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "organizationId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "updateInService",
            "in": "query",
            "description": "Заказы, которые стоят в очереди на изменение статуса на маркетплейсе",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Заказы, которые стоят в очереди на изменение статуса на маркетплейсе"
            }
          },
          {
            "name": "hasServiceError",
            "in": "query",
            "description": "Заказы с ошибкой обновления статуса на маркетплейсе",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Заказы с ошибкой обновления статуса на маркетплейсе"
            }
          },
          {
            "name": "noLabel",
            "in": "query",
            "description": "Фильтрует заказы без этикетки",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтрует заказы без этикетки"
            }
          },
          {
            "name": "noMsOrder",
            "in": "query",
            "description": "Фильтрует по заказам не созданным в Моем складе",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтрует по заказам не созданным в Моем складе"
            }
          },
          {
            "name": "noMsDemand",
            "in": "query",
            "description": "Фильтрует по заказам с несозданными отгрузками в Моем складе",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтрует по заказам с несозданными отгрузками в Моем складе"
            }
          },
          {
            "name": "ids",
            "in": "query",
            "description": "Идентификаторы заказов для печати",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Идентификаторы заказов для печати"
            }
          },
          {
            "name": "supplyId",
            "in": "query",
            "description": "Поставка, в которой отгружается заказ",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Поставка, в которой отгружается заказ"
            }
          },
          {
            "name": "notCollected",
            "in": "query",
            "description": "Заказы, которые не собирались через SelSup",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Заказы, которые не собирались через SelSup"
            }
          },
          {
            "name": "dbs",
            "in": "query",
            "description": "DBS заказы",
            "required": false,
            "schema": {
              "type": "string",
              "description": "DBS заказы"
            }
          },
          {
            "name": "express",
            "in": "query",
            "description": "Express заказы",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Express заказы"
            }
          },
          {
            "name": "fbs",
            "in": "query",
            "description": "FBS заказы",
            "required": false,
            "schema": {
              "type": "string",
              "description": "FBS заказы"
            }
          },
          {
            "name": "noWarehouse",
            "in": "query",
            "description": "Заказы без склада",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Заказы без склада"
            }
          },
          {
            "name": "closeDate",
            "in": "query",
            "description": "Фильтр по дате сборки заказа - конкретный день",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр по дате сборки заказа - конкретный день"
            }
          },
          {
            "name": "modifiedDate",
            "in": "query",
            "description": "Фильтр по дате изменения заказа - статуса или любой информации о заказе",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр по дате изменения заказа - статуса или любой информации о заказе"
            }
          },
          {
            "name": "incomeId",
            "in": "query",
            "description": "id закупки из которого создан order",
            "required": false,
            "schema": {
              "type": "string",
              "description": "id закупки из которого создан order"
            }
          },
          {
            "name": "bindingOrderId",
            "in": "query",
            "description": "id заказа, которому делаем возврат",
            "required": false,
            "schema": {
              "type": "string",
              "description": "id заказа, которому делаем возврат"
            }
          },
          {
            "name": "closeDateFrom",
            "in": "query",
            "description": "Фильтр по дате сборки заказа от - ISO",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр по дате сборки заказа от - ISO"
            }
          },
          {
            "name": "closeDateTo",
            "in": "query",
            "description": "Фильтр по дате сборки заказа до - ISO",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр по дате сборки заказа до - ISO"
            }
          },
          {
            "name": "orderDate",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "deliveryDate",
            "in": "query",
            "description": "Фильтр по дате доставки заказа",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр по дате доставки заказа"
            }
          },
          {
            "name": "deliveryDateFrom",
            "in": "query",
            "description": "Фильтр по дате доставки заказа от",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр по дате доставки заказа от"
            }
          },
          {
            "name": "deliveryDateTo",
            "in": "query",
            "description": "Фильтр по дате доставки заказа до",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр по дате доставки заказа до"
            }
          },
          {
            "name": "forMoySklad",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "warehouseId",
            "in": "query",
            "description": "Фильтр по складу, с которого отгружается заказ",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр по складу, с которого отгружается заказ"
            }
          },
          {
            "name": "dateFrom",
            "in": "query",
            "description": "Фильтр по дате заказа - от",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр по дате заказа - от"
            }
          },
          {
            "name": "dateTo",
            "in": "query",
            "description": "Фильтр по дате заказа - до",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр по дате заказа - до"
            }
          },
          {
            "name": "markingStatus",
            "in": "query",
            "description": "Фильтр по статусу в честном знаке",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Фильтр по статусу в честном знаке"
            }
          },
          {
            "name": "deleted",
            "in": "query",
            "description": "Показать удаленные заказы",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Показать удаленные заказы"
            }
          },
          {
            "name": "collectLabel",
            "in": "query",
            "description": "Только для печати в PDF. Признак необходимости распечатать сборочную этикетку для \"умной ленты\"",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Только для печати в PDF. Признак необходимости распечатать сборочную этикетку для \"умной ленты\""
            }
          },
          {
            "name": "sortOrdersByDate",
            "in": "query",
            "description": "Только для печати в PDF. Признак необходимости распечатать сборочную этикетку для \"умной ленты\"",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Только для печати в PDF. Признак необходимости распечатать сборочную этикетку для \"умной ленты\""
            }
          },
          {
            "name": "productLabel",
            "in": "query",
            "description": "Только для печати в PDF. Признак необходимости распечатать этикетку товара в ленте",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Только для печати в PDF. Признак необходимости распечатать этикетку товара в ленте"
            }
          },
          {
            "name": "servicesForLabel",
            "in": "query",
            "description": "Сервисы для которых нужна печать в PDF",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Сервисы для которых нужна печать в PDF"
            }
          },
          {
            "name": "infoLabel",
            "in": "query",
            "description": "Только для печати в PDF. Признак необходимости распечатать информационную этикетку для ленты заказов",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Только для печати в PDF. Признак необходимости распечатать информационную этикетку для ленты заказов"
            }
          },
          {
            "name": "grouped",
            "in": "query",
            "description": "Отдает сгруппированные позиции из заказов. Только для выгрузки в Excel",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Отдает сгруппированные позиции из заказов. Только для выгрузки в Excel"
            }
          },
          {
            "name": "replaceSetByComponent",
            "in": "query",
            "description": "Заменяет в заказах комплекты на компоненты",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Заменяет в заказах комплекты на компоненты"
            }
          },
          {
            "name": "collectDeliveryLabel",
            "in": "query",
            "description": "Только для печати в PDF. Признак необходимости распечатать накладную службы доставки для \"умной ленты\"",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Только для печати в PDF. Признак необходимости распечатать накладную службы доставки для \"умной ленты\""
            }
          },
          {
            "name": "shippingServicesForLabel",
            "in": "query",
            "description": "Сервисы доставки для которых нужна печать накладной в PDF",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Сервисы доставки для которых нужна печать накладной в PDF"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "description": "Идентификатор заказа",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Идентификатор заказа"
            }
          },
          {
            "name": "hasVideoFixation",
            "in": "query",
            "description": "Идентификатор была ли видео фиксация",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Идентификатор была ли видео фиксация"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Ограничение на количество записей. Максимальное значение - 500",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Ограничение на количество записей. Максимальное значение - 500"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Номер страницы начиная с 1",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Номер страницы начиная с 1"
            }
          },
          {
            "name": "count",
            "in": "query",
            "description": "Возвратить в ответе общее количество записей",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Возвратить в ответе общее количество записей"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "description": "Поле сортировки записей. Работает только при получении списка.",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Поле сортировки записей. Работает только при получении списка."
            }
          },
          {
            "name": "ascending",
            "in": "query",
            "description": "Порядок сортировки - по возрастанию?. Работает только при получении списка.",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Порядок сортировки - по возрастанию?. Работает только при получении списка."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/TmsTask"
                }
              }
            }
          }
        }
      }
    },
    "/api/delivery/cancelDeliveryOrder": {
      "post": {
        "tags": [
          "Доставка"
        ],
        "summary": "Отмена заказа в сервисе доставки",
        "operationId": "cancelDeliveryOrder",
        "parameters": [
          {
            "name": "orderId",
            "in": "query",
            "description": "Идентификатор заказа",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Идентификатор заказа"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/delivery/calculateTariff": {
      "post": {
        "tags": [
          "Доставка"
        ],
        "summary": "Расчет стоимости конкретного тарифа для указанных данных заказа с дополнительными услугами",
        "operationId": "calculateTariff",
        "parameters": [
          {
            "name": "tariffCode",
            "in": "query",
            "description": "Код тарифа для доставки",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Код тарифа для доставки"
            }
          },
          {
            "name": "service",
            "in": "query",
            "description": "Сервис доставки",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Сервис доставки"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "description": "Идентификатор заказа",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Идентификатор заказа"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatedDeliveryTariff"
                }
              }
            }
          }
        }
      }
    },
    "/api/delivery/addDeliveryServiceIntegration": {
      "post": {
        "tags": [
          "Доставка"
        ],
        "summary": "Добавить интеграцию с сервисом доставки",
        "description": "Позволяет добавить новую интеграцию с сервисом доставки",
        "operationId": "addDeliveryServiceIntegration",
        "parameters": [
          {
            "name": "service",
            "in": "query",
            "description": "Сервис доставки",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Сервис доставки"
            }
          },
          {
            "name": "serviceClientId",
            "in": "query",
            "description": "Клиентский идентификатор",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Клиентский идентификатор"
            }
          },
          {
            "name": "serviceSecret",
            "in": "query",
            "description": "Пароль/секрет",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Пароль/секрет"
            }
          },
          {
            "name": "token",
            "in": "query",
            "description": "Токен авторизации",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Токен авторизации"
            }
          },
          {
            "name": "organizationId",
            "in": "query",
            "description": "Организация",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Организация"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/delivery/integration/{organizationId}/{service}": {
      "get": {
        "tags": [
          "Доставка"
        ],
        "summary": "Получить интеграцию с сервисом доставки",
        "operationId": "getIntegration",
        "parameters": [
          {
            "name": "service",
            "in": "path",
            "description": "Сервис доставки",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Сервис доставки"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "description": "Организация",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Организация"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryServiceData"
                }
              }
            }
          }
        }
      }
    },
    "/api/delivery/getWarehouseDelivery": {
      "get": {
        "tags": [
          "Доставка"
        ],
        "summary": "Выбрать пункты доставки со складов",
        "operationId": "getWarehouseDelivery",
        "parameters": [
          {
            "name": "organizationId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "service",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "CDEK",
                "OWN_DELIVERY",
                "POST",
                "BOXBERRY",
                "DPD",
                "YANDEX",
                "DOSTAVISTA"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WarehouseDelivery"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/delivery/getRegions": {
      "get": {
        "tags": [
          "Доставка"
        ],
        "summary": "Выбрать регионы доставки",
        "operationId": "getRegions",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "description": "Поисковый запрос для фильтрации регионов",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Поисковый запрос для фильтрации регионов"
            }
          },
          {
            "name": "service",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "CDEK",
                "OWN_DELIVERY",
                "POST",
                "BOXBERRY",
                "DPD",
                "YANDEX",
                "DOSTAVISTA"
              ]
            }
          },
          {
            "name": "organizationId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeliveryRegion"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/delivery/getPoints": {
      "get": {
        "tags": [
          "Доставка"
        ],
        "summary": "Выбрать пункты доставки",
        "description": "Позволяет получить пункты доставки для заказа по фильтру. Выбранный пункт необходимо после сохранить в заказ",
        "operationId": "getPoints",
        "parameters": [
          {
            "name": "postCode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "forSupply",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "service",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "CDEK",
                "OWN_DELIVERY",
                "POST",
                "BOXBERRY",
                "DPD",
                "YANDEX",
                "DOSTAVISTA"
              ]
            }
          },
          {
            "name": "organizationId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeliveryPoint"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/delivery/getDeliveryTariffs": {
      "get": {
        "tags": [
          "Доставка"
        ],
        "summary": "Получить все возможные тарифы для выбранного сервиса доставки",
        "operationId": "getDeliveryTariffs",
        "parameters": [
          {
            "name": "service",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "CDEK",
                "OWN_DELIVERY",
                "POST",
                "BOXBERRY",
                "DPD",
                "YANDEX",
                "DOSTAVISTA"
              ]
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeliveryTariff"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/delivery/getCities": {
      "get": {
        "tags": [
          "Доставка"
        ],
        "summary": "Выбрать город доставки",
        "description": "Метод используется для саджеста списка городов, для выбранной службы доставки. Можно пофильтровать города по региону",
        "operationId": "getCities",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "description": "Поисковый запрос для фильтрации городов",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Поисковый запрос для фильтрации городов"
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Фильтр по региону - передается код региона из саджеста для выбранной службы доставки",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Фильтр по региону - передается код региона из саджеста для выбранной службы доставки"
            }
          },
          {
            "name": "service",
            "in": "query",
            "description": "Служба доставки",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Служба доставки"
            }
          },
          {
            "name": "organizationId",
            "in": "query",
            "description": "Организация",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Организация"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeliveryCity"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/delivery/getAddress": {
      "get": {
        "tags": [
          "Доставка"
        ],
        "summary": "Выбрать адрес получателя",
        "description": "Позволяет найти адрес получателя для заказа по фильтру. Выбранный пункт необходимо после сохранить в заказ",
        "operationId": "getAddress",
        "parameters": [
          {
            "name": "postCode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "forSupply",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AddressDto"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/delivery/fetchDeliveryServiceAdditionalServices": {
      "get": {
        "tags": [
          "Доставка"
        ],
        "summary": "Дополнительные услуги сервиса доставки",
        "operationId": "fetchDeliveryAdditionalServices",
        "parameters": [
          {
            "name": "service",
            "in": "query",
            "description": "Сервис доставки",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Сервис доставки"
            }
          },
          {
            "name": "tariffCode",
            "in": "query",
            "description": "Код тарифа",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Код тарифа"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "*/*": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AdditionalDeliveryServiceDto"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AdditionalDeliveryServiceDto": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        },
        "description": "Дополнительные услуги к тарифу"
      },
      "Address": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "postCode": {
            "type": "string"
          },
          "country": {
            "$ref": "#/components/schemas/Country"
          },
          "region": {
            "$ref": "#/components/schemas/Region"
          },
          "regionId": {
            "type": "integer",
            "format": "int32"
          },
          "street": {
            "type": "string"
          },
          "house": {
            "type": "string"
          },
          "district": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "locality": {
            "type": "string"
          },
          "building": {
            "type": "string"
          },
          "flat": {
            "type": "string"
          },
          "short": {
            "type": "string"
          },
          "full": {
            "type": "string"
          },
          "addressId": {
            "$ref": "#/components/schemas/Address"
          }
        },
        "description": "Адресс организации"
      },
      "Country": {
        "type": "object",
        "properties": {
          "countryId": {
            "type": "integer",
            "description": "Идентификатор страны",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Название страны"
          },
          "code2": {
            "type": "string",
            "description": "Двухбуквенный код страны"
          },
          "code3": {
            "type": "string",
            "description": "Трехбуквенный код страны"
          },
          "printName": {
            "type": "string"
          }
        },
        "description": "Страна"
      },
      "DeliveryTariff": {
        "type": "object",
        "properties": {
          "deliverySum": {
            "type": "number",
            "description": "Стоимость доставки",
            "format": "float"
          },
          "periodMin": {
            "type": "integer",
            "description": "Минимальное время доставки (в рабочих днях)",
            "format": "int32"
          },
          "periodMax": {
            "type": "integer",
            "description": "Максимальное время доставки (в рабочих днях)",
            "format": "int32"
          },
          "calendarMin": {
            "type": "integer",
            "description": "Минимальное время доставки (в календарных днях)",
            "format": "int32"
          },
          "calendarMax": {
            "type": "integer",
            "description": "Максимальное время доставки (в календарных днях)",
            "format": "int32"
          },
          "tariffId": {
            "type": "integer",
            "description": "Уникальный идентификатор",
            "format": "int32"
          },
          "shippingService": {
            "type": "string",
            "description": "Сервис доставки, которому принадлежит данный тариф",
            "enum": [
              "CDEK",
              "OWN_DELIVERY",
              "POST",
              "BOXBERRY",
              "DPD",
              "YANDEX",
              "DOSTAVISTA"
            ]
          },
          "tariffCode": {
            "type": "integer",
            "description": "Код тарифа",
            "format": "int32"
          },
          "tariffName": {
            "type": "string",
            "description": "Название тарифа"
          },
          "tariffDescription": {
            "type": "string",
            "description": "Описание тарифа"
          },
          "deliveryMode": {
            "type": "string",
            "description": "Режим доставки",
            "enum": [
              "0",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10"
            ]
          },
          "additionalServices": {
            "type": "array",
            "description": "Дополнительные услуги к тарифу",
            "items": {
              "$ref": "#/components/schemas/AdditionalDeliveryServiceDto"
            }
          }
        }
      },
      "Organization": {
        "required": [
          "inn",
          "name"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "STAMP",
              "SIGNATURE"
            ]
          },
          "id": {
            "type": "integer",
            "description": "Идентификатор организации. Проставляется автоматически",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "description": "Полное наименование организации"
          },
          "shortName": {
            "type": "string"
          },
          "taxType": {
            "type": "string",
            "description": "Система налогооблажения",
            "enum": [
              "YSN",
              "YSN_CONSUMPTION",
              "OSNO",
              "SELF_EMPLOYED"
            ]
          },
          "taxRate": {
            "type": "integer",
            "description": "Ставка налога, если она отличается от стандартной",
            "format": "int32"
          },
          "inn": {
            "type": "string",
            "description": "ИНН"
          },
          "kpp": {
            "type": "string",
            "description": "КПП. Проставляется только для ООО"
          },
          "bank": {
            "type": "string",
            "description": "Название банка"
          },
          "bik": {
            "type": "string",
            "description": "БИК счета организации"
          },
          "corrBill": {
            "type": "string",
            "description": "Номер корреспондентского счета"
          },
          "billNumber": {
            "type": "string",
            "description": "Номер счета организации"
          },
          "stampPath": {
            "type": "string",
            "description": "Ссылка на изображение печати организации",
            "readOnly": true
          },
          "stampSize": {
            "type": "integer",
            "description": "Размер в байтах изображения печати организации",
            "format": "int32",
            "readOnly": true
          },
          "stampWidth": {
            "type": "integer",
            "description": "Ширина изображения печати организации",
            "format": "int32",
            "readOnly": true
          },
          "stampHeight": {
            "type": "integer",
            "description": "Высота изображения печати организации",
            "format": "int32",
            "readOnly": true
          },
          "signaturePath": {
            "type": "string",
            "description": "Фото подписи директора организации",
            "readOnly": true
          },
          "signatureSize": {
            "type": "integer",
            "description": "Размер файла в байтах подписи директора организации",
            "format": "int32",
            "readOnly": true
          },
          "signatureWidth": {
            "type": "integer",
            "description": "Ширина изображения подписи директора",
            "format": "int32",
            "readOnly": true
          },
          "signatureHeight": {
            "type": "integer",
            "description": "Высота изображения подписи директора",
            "format": "int32",
            "readOnly": true
          },
          "ipPerson": {
            "$ref": "#/components/schemas/Person"
          },
          "form": {
            "type": "string",
            "description": "Форма собственности организации",
            "enum": [
              "OOO",
              "IP",
              "SELF_EMPLOYED"
            ]
          },
          "ip": {
            "type": "boolean"
          },
          "clientId": {
            "type": "integer",
            "description": "Идентификатор клиента",
            "format": "int64",
            "readOnly": true
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "phoneNumber": {
            "type": "string",
            "description": "Номер телефона"
          },
          "addressFull": {
            "type": "string"
          }
        },
        "description": "Данные об организации"
      },
      "Person": {
        "required": [
          "firstName",
          "lastName"
        ],
        "type": "object",
        "properties": {
          "personId": {
            "type": "integer",
            "format": "int64"
          },
          "firstName": {
            "maxLength": 255,
            "type": "string",
            "description": "Имя сотрудника"
          },
          "lastName": {
            "maxLength": 255,
            "type": "string",
            "description": "Фамилия сотрудника"
          },
          "surName": {
            "maxLength": 255,
            "type": "string",
            "description": "Отчество сотрудника"
          },
          "clientId": {
            "type": "integer",
            "description": "Идентификатор клиента",
            "format": "int64",
            "readOnly": true
          },
          "position": {
            "$ref": "#/components/schemas/PersonPosition"
          },
          "versionId": {
            "type": "integer",
            "description": "Поле нужно передавать при изменении,для предотвращения одновременной перезаписи",
            "format": "int64"
          },
          "createdUser": {
            "type": "string",
            "description": "Проставляется автоматически. Пользователь создавший сотрудника",
            "readOnly": true
          },
          "createdDate": {
            "type": "string",
            "description": "Проставляется автоматически. Дата создания сотрудника",
            "format": "date-time",
            "readOnly": true
          },
          "deleted": {
            "type": "boolean",
            "description": "Признак удаления сотрудника",
            "readOnly": true
          },
          "userId": {
            "type": "integer",
            "description": "Связь сотрудника с пользователем",
            "format": "int32",
            "readOnly": true
          },
          "hasChanges": {
            "type": "boolean"
          },
          "fullName": {
            "type": "string",
            "description": "Полные ФИО",
            "readOnly": true
          },
          "shortName": {
            "type": "string",
            "description": "Фамилия и инициалы",
            "readOnly": true
          }
        },
        "description": "Сотрудник"
      },
      "PersonPosition": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Идентификатор должности. Проставляется автоматически",
            "format": "int64"
          },
          "name": {
            "maxLength": 255,
            "type": "string",
            "description": "Название должности"
          },
          "deleted": {
            "type": "boolean",
            "description": "Признак удаления должности",
            "readOnly": true
          },
          "clientId": {
            "type": "integer",
            "description": "Идентификатор клиента",
            "format": "int64",
            "readOnly": true
          },
          "defaultJobId": {
            "type": "integer",
            "description": "Работа по умолчанию для должности",
            "format": "int64"
          },
          "createdUser": {
            "type": "string",
            "description": "Пользователь, который создал должность",
            "readOnly": true
          },
          "createdDate": {
            "type": "string",
            "description": "Дата создания должности",
            "format": "date-time",
            "readOnly": true
          }
        },
        "description": "Должность"
      },
      "Region": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "countryId": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "regionId": {
            "$ref": "#/components/schemas/Region"
          }
        }
      },
      "WarehouseDelivery": {
        "type": "object",
        "properties": {
          "warehouseDeliveryId": {
            "type": "integer",
            "format": "int64"
          },
          "point": {
            "type": "string"
          },
          "service": {
            "type": "string",
            "enum": [
              "CDEK",
              "OWN_DELIVERY",
              "POST",
              "BOXBERRY",
              "DPD",
              "YANDEX",
              "DOSTAVISTA"
            ]
          },
          "warehouseId": {
            "type": "integer",
            "format": "int64"
          },
          "organizationId": {
            "type": "integer",
            "format": "int64"
          },
          "tariffPriority": {
            "type": "string"
          },
          "priorities": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int32"
            }
          },
          "priorityByMode": {
            "type": "boolean"
          },
          "additionalServices": {
            "type": "string"
          },
          "sendZeroPrice": {
            "type": "boolean"
          },
          "fakeName": {
            "type": "string"
          },
          "hideOrganization": {
            "type": "boolean"
          },
          "sellerOrganizationId": {
            "type": "integer",
            "format": "int64"
          },
          "organization": {
            "$ref": "#/components/schemas/Organization"
          },
          "additionalServiceForTariff": {
            "$ref": "#/components/schemas/DeliveryTariff"
          }
        }
      },
      "TmsTask": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Идентификатор задачи",
            "format": "int64",
            "readOnly": true
          },
          "status": {
            "type": "string",
            "description": "Текущий статус задачи",
            "readOnly": true,
            "enum": [
              "CREATED",
              "RUNNING",
              "FINISHED",
              "ERROR",
              "RESTARTING",
              "INTERRUPTING",
              "INTERRUPTED",
              "STOPPED",
              "EXCEPTION"
            ]
          },
          "type": {
            "type": "string",
            "description": "Тип задачи",
            "readOnly": true,
            "enum": [
              "WILDBERRIES_CREATE_CARD",
              "NATIONAL_CATALOG_CREATE_CARD",
              "OZON_CREATE_CARD",
              "OZON_CARDS_IMPORT",
              "IMPORT_FBS_ORDERS",
              "UPLOAD_PHOTOGRAPHY_TO_WILDBERRIES",
              "WILDBERRIES_UPDATE_PRICE",
              "WILDBERRIES_CARD_IMPORT",
              "WILDBERRIES_CARD_UPDATE",
              "SELSUP_STOCKS",
              "REFRESH_PHOTOGRAPHY",
              "SUPPLYING_QUANTITY_TASK",
              "EXPORT_PRICE",
              "OZON_UPDATE_PRICE",
              "WILDBERRIES_FILE_TASK",
              "YANDEX_MARKET_CARD_CREATE",
              "OZON_CARD_UPDATE_TASK",
              "OZON_IMPORT_STAT_TASK",
              "WILDBERRIES_PROFIT_STAT_TASK",
              "ALIEXPRESS_CREATE_CARD_TASK",
              "ALIEXPRESS_UPDATE_CARD_TASK",
              "PRICES_IMPORT_TASK",
              "WILDBERRIES_PRICES_TASK",
              "YANDEX_MARKET_CARD_IMPORT",
              "STOCKS_UPDATE",
              "WILDBERRIES_STOCKS_IMPORT_TASK",
              "WILDBERRIES_ORDERS_AND_SALES_TASK",
              "WILDBERRIES_INCOMES_IMPORT_TASK",
              "OZON_STOCKS_IMPORT_TASK",
              "TURNOVER_DOCUMENTS_TASK",
              "INTRODUCE_WMS_ITEMS_TASK",
              "PRODUCTS_FILE_TASK",
              "MODELS_FILE_TASK",
              "UPDATE_PRODUCT_CODES_TASK",
              "INTRODUCE_CODES_TASK",
              "PRODUCTS_IMPORT_TASK",
              "PRICES_FILE_TASK",
              "YANDEX_MARKET_UPDATE_PRICE_TASK",
              "IMPORT_STOCKS_TASK",
              "MOY_SKLAD_EXPORT_ORDERS",
              "MERGE_PRODUCTS_TASK",
              "PRODUCTS_WILDBERRIES_EXCEL_IMPORT_TASK",
              "MOY_SKLAD_CREATE_CARD",
              "IMPORT_FBO_STOCKS_FROM_FILE",
              "CREATE_WMS_ITEMS",
              "MOY_SKLAD_CARDS_IMPORT",
              "PROMOTION_FILE",
              "TOCHKA_INIT_STATEMENT",
              "TOCHKA_IMPORT_TRANSACTIONS",
              "PRODUCT_ANALYTICS_FILE_TASK",
              "PROMOTION_RESET_FILE",
              "MOY_SKLAD_IMPORT_ORDERS",
              "FINANCE_REPORT_FILE_TASK",
              "YML_FILE_EXPORT",
              "PRODUCT_BALANCE_REPORT_FILE_TASK",
              "CURRENT_PRODUCT_BALANCE_FILE_TASK",
              "SBER_IMPORT_TRANSACTIONS",
              "MATCH_UNREGISTERED_PROFIT_REPORT_TASK",
              "UPDATE_AVERAGE_SERVICE_EXPENSES_TASK",
              "YANDEX_MARKET_ORDER_IMPORT_STAT_TASK",
              "ABC_REPORT_FILE_TASK",
              "MODEL_CONTRACTORS_IMPORT",
              "MODEL_CONTRACTORS_EXPORT",
              "BANK_TRANSACTION_IMPORT_FILE_TASK",
              "YML_IMPORT_TASK",
              "SALES_DYNAMIC_REPORT_FILE_TASK",
              "UPDATE_FBS_ORDERS",
              "EXPORT_TRANSACTION_IN_EXCEL_FILE_TASK",
              "IMPORT_TRANSACTION_FROM_EXCEL_FILE_TASK",
              "EXPORT_PROFIT_REPORT_FILE_TASK",
              "IMPORT_PROFIT_REPORT_FROM_EXCEL_FILE_TASK",
              "IMPORT_WILDBERRIES_EXCEL_REALIZATION_REPORT_TASK",
              "STOCK_RECONCILIATION",
              "ORDER_REPORT_FILE_TASK",
              "GET_WB_FBO_ORDER_FROM_PROFIT_REPORT_TASK",
              "TO_QUANTITY_STORAGE_METHOD",
              "APPLY_RECONCILIATION",
              "OZON_IMPORT_FBO_ORDERS_TASK",
              "UPDATE_PURCHASE_PRICE_IN_PROFIT_REPORT_TASK",
              "FBS_LABELS",
              "MERGE_PRODUCT_STOCKS",
              "CREATE_ORDER_FROM_FILE",
              "ALIEXPRESS_CARD_IMPORT",
              "PRICE_LIST_IMPORT",
              "WB_STOCK_REPORT_FILE",
              "CONTRACTORS_REPORT_FILE",
              "PRODUCTS_SBER_MEGA_MARKET_EXCEL_IMPORT_TASK",
              "EXPORT_PROBLEMATIC_PRODUCT_REPORT",
              "PLAN_SUPPLY_REPORT_TASK",
              "PLAN_FACT_SALES_REPORT_FILE",
              "IMPORT_PLAN_SALES_FROM_EXCEL_FILE_TASK",
              "EXPORT_PLAN_SALES_EXCEL_FILE_TASK",
              "ORDERS_TO_BUY_FILE_TASK",
              "MERGE_PRICE_ON_OTHER_MP_TASK",
              "MATCH_PRODUCT_LAST_OPERATION_DATE_TASK",
              "PROBLEMATIC_PRODUCT_PRICE_FILE_TASK",
              "CATEGORIES_IMPORT_EXCEL_TASK",
              "AVITO_CARD_IMPORT",
              "UPDATE_OLD_WB_ORDER_STATUSES_TASK",
              "PRESTA_SHOP_IMPORT_TASK",
              "PRODUCTS_AVITO_EXCEL_IMPORT_TASK",
              "FBO_STOCK_RECONCILIATION_TASK",
              "APPLY_FBO_RECONCILIATION_TASK",
              "EXPORT_REPRICE_PRODUCT_CONFIG_TASK",
              "IMPORT_REPRICE_PRODUCT_CONFIG_TASK",
              "OZON_CASH_FLOW_STATEMENT_IMPORT_TASK",
              "IMPORT_PROMOTION_STRATEGY_FILE_TASK",
              "UPDATE_ORDER_DELIVERY_INFO_TASK",
              "BILLING_OPERATION_TASK",
              "SET_PURCHASE_PERCENT_TASK",
              "REMOVE_PRODUCT_IMAGES_TASK",
              "STRUCTURE_TURNOVER_TASK",
              "OZON_NEW_UPDATE_PRICE",
              "REPLACE_PRODUCT_IMAGE_TASK",
              "UPDATE_OZON_PROMOTION_DATA_TASK",
              "WILDBERRIES_IMPORT_CAMPAIGN_TASK",
              "WILDBERRIES_STORAGE_REPORT_TASK",
              "WEBASYST_LINK_ARTICLE_TASK",
              "DELIVERY_SERVICE_LABELS",
              "HAND_ON_PULSE_FILE_TASK",
              "ITEMS_INCOME_EXCEL_TASK",
              "UPDATE_SETS_EXCEL_TASK",
              "DELETE_PROFIT_REPORTS_BY_FILE_HISTORY_IDS_TASK",
              "EXPORT_PRODUCT_SETS_TASK",
              "AMAZON_CARD_IMPORT",
              "IMPORT_ACCEPTED_PRODUCTS_TASK",
              "ADD_ORDER_PRODUCT_FROM_FILE_TASK",
              "EXPORT_ITEM_HISTORY_FILE_TASK",
              "WILDBERRIES_IMPORT_CAMPAIGN_BY_EXCEL_TASK",
              "REMOVE_CLIENT_ORGANIZATION",
              "EBAY_CARD_IMPORT_TASK"
            ]
          },
          "name": {
            "type": "string",
            "description": "Данные задачи в json - могут быть пустыми"
          },
          "clientId": {
            "type": "integer",
            "format": "int64"
          },
          "entityId": {
            "type": "integer",
            "description": "Сущность, к которой относится задача",
            "format": "int64"
          },
          "progress": {
            "type": "integer",
            "description": "Прогресс выполнения задачи в процентах",
            "format": "int32"
          },
          "organizationId": {
            "type": "integer",
            "description": "Организация задачи, может быть 0, если не зависит от организации",
            "format": "int64"
          },
          "priority": {
            "type": "integer",
            "description": "Приоритет задачи - чем выше тем быстрее задача запустится",
            "format": "int32"
          },
          "properties": {
            "type": "string",
            "description": "Параметры задачи"
          },
          "rand": {
            "type": "integer",
            "description": "Используется для контроля уникальности задач в очереди. Не проставлять",
            "format": "int64"
          },
          "message": {
            "type": "string",
            "description": "Сообщение с результатом выполнения задачи"
          },
          "messageParams": {
            "type": "string",
            "description": "Параметры сообщения с результатом выполнения задачи"
          },
          "createdDate": {
            "type": "string",
            "description": "Дата добавления задачи в очередь",
            "format": "date-time"
          },
          "startDate": {
            "type": "string",
            "description": "Дата запуска задачи",
            "format": "date-time"
          },
          "finishDate": {
            "type": "string",
            "description": "Дата завершения задачи",
            "format": "date-time"
          },
          "file": {
            "type": "string",
            "description": "Путь к результирующему файлу для скачивания. Путь строится к /files/file?path=..."
          },
          "url": {
            "type": "string",
            "description": "Ссылка на скачивание файла с результатом задачи"
          },
          "inputFilePath": {
            "type": "string",
            "description": "Пусть к файлу, не отдается по умолчанию"
          },
          "inputFileUrl": {
            "type": "string",
            "description": "Ссылка на загруженный файл"
          },
          "retryNumber": {
            "type": "integer",
            "description": "Счётчик перезапуска задачи.",
            "format": "int32"
          },
          "userId": {
            "type": "integer",
            "description": "Пользователь запустивший задачу",
            "format": "int32"
          },
          "retryDate": {
            "type": "string",
            "description": "Запланировання дата перезапуска",
            "format": "date-time"
          },
          "debug": {
            "type": "boolean",
            "description": "Запуск задачи в режиме отладки с большим логированием"
          },
          "forcedStart": {
            "type": "boolean",
            "description": "Ручной запуск задачи"
          }
        },
        "description": "Фоновая задача SelSup. Возвращается в разных методах, которые можно выполнять асинхронно. Далее можно проверять статус задачи, вызывая метод /task/getTask?id="
      },
      "CalculatedDeliveryTariff": {
        "type": "object",
        "properties": {
          "deliverySum": {
            "type": "number",
            "description": "Стоимость доставки",
            "format": "float"
          },
          "periodMin": {
            "type": "integer",
            "description": "Минимальное время доставки (в рабочих днях)",
            "format": "int32"
          },
          "periodMax": {
            "type": "integer",
            "description": "Максимальное время доставки (в рабочих днях)",
            "format": "int32"
          },
          "calendarMin": {
            "type": "integer",
            "description": "Минимальное время доставки (в календарных днях)",
            "format": "int32"
          },
          "calendarMax": {
            "type": "integer",
            "description": "Максимальное время доставки (в календарных днях)",
            "format": "int32"
          },
          "services": {
            "type": "object",
            "additionalProperties": {
              "type": "number",
              "format": "float"
            }
          },
          "locationToCode": {
            "type": "string"
          },
          "locationFromCode": {
            "type": "string"
          },
          "tariffCode": {
            "type": "integer",
            "format": "int32"
          },
          "deliveryModeToOrderCreate": {
            "type": "string",
            "enum": [
              "0",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10"
            ]
          },
          "deliveryModeList": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "0",
                "1",
                "2",
                "3",
                "4",
                "5",
                "6",
                "7",
                "8",
                "9",
                "10"
              ]
            }
          }
        }
      },
      "DeliveryServiceData": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "tokenExpiredDate": {
            "type": "string",
            "format": "date-time"
          },
          "service": {
            "type": "string",
            "enum": [
              "CDEK",
              "OWN_DELIVERY",
              "POST",
              "BOXBERRY",
              "DPD",
              "YANDEX",
              "DOSTAVISTA"
            ]
          },
          "serviceClientId": {
            "type": "string"
          },
          "serviceSecret": {
            "$ref": "#/components/schemas/DeliveryServiceData"
          },
          "clientId": {
            "type": "integer",
            "format": "int64"
          },
          "organizationId": {
            "type": "integer",
            "format": "int64"
          },
          "updateToken": {
            "type": "boolean"
          },
          "hasSecret": {
            "type": "boolean"
          }
        }
      },
      "DeliveryRegion": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "DeliveryPoint": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "location": {
            "$ref": "#/components/schemas/DeliveryPointsLocation"
          },
          "address": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "zipCode": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "site": {
            "type": "string"
          },
          "addressComment": {
            "type": "string"
          },
          "workTime": {
            "type": "string"
          },
          "phones": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Phone"
            }
          },
          "note": {
            "type": "string"
          }
        }
      },
      "DeliveryPointsLocation": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "description": "Строка адреса"
          },
          "code": {
            "type": "integer",
            "description": "Код населенного пункта СДЭК",
            "format": "int32"
          },
          "postal_code": {
            "type": "string",
            "description": "Почтовый индекс"
          },
          "country_code": {
            "type": "string",
            "description": "Код страны в формате  ISO_3166-1_alpha-2"
          },
          "city": {
            "type": "string",
            "description": "Название города"
          },
          "fias_guid": {
            "type": "string",
            "description": "Уникальный идентификатор ФИАС населенного пункта"
          },
          "longitude": {
            "type": "number",
            "description": "Долгота центра населенного пункта",
            "format": "float"
          },
          "latitude": {
            "type": "number",
            "description": "Широта центра населенного пункта",
            "format": "float"
          },
          "region": {
            "type": "string",
            "description": "Название региона населенного пункта"
          },
          "region_code": {
            "type": "integer",
            "description": "Код региона СДЭК",
            "format": "int32"
          },
          "address_full": {
            "type": "string",
            "description": "Строка адреса"
          },
          "city_code": {
            "type": "string",
            "description": "Код населенного пункта СДЭК"
          }
        }
      },
      "Phone": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "description": "Номер телефонаДолжен передаваться в международном формате: код страны (для России +7) и сам номер (10 и более цифр)"
          },
          "additional": {
            "type": "string",
            "description": "Дополнительная информация (добавочный номер)"
          }
        }
      },
      "DeliveryCity": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "AddressDto": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "description": "Адрес найденного объекта"
          },
          "postalCode": {
            "type": "string",
            "description": "Индекс почтового отделения"
          },
          "region": {
            "type": "string",
            "description": "Область/Край"
          },
          "locality": {
            "type": "string",
            "description": "Населённый пункт"
          },
          "street": {
            "type": "string",
            "description": "Улица"
          },
          "house": {
            "type": "string",
            "description": "Отдельный дом"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    }
  }
}