{
  "openapi": "3.0.0",
  "info": {
    "title": "api/dictionaries/catalogs",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "/"
    },
    {
      "url": "https://api.ati.su"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/v1.2/catalogs/dictionaries/truckbrands": {
      "get": {
        "tags": [
          "Словари ТС"
        ],
        "summary": "Получение словаря со всеми брендами ТС",
        "operationId": "TruckDictionaries_GetTruckBrands",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "style": "form",
            "explode": true,
            "description": "Массив идентификаторов брэндов, необязательный параметр",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Список брендов ТС",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/components/schemas/TruckBrandView"
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinalExceptionView"
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/gw/oauth2/catalogs/v1.2/dictionaries/truckbrands": {
      "get": {
        "tags": [
          "Словари ТС"
        ],
        "summary": "Получение словаря со всеми брендами ТС",
        "operationId": "TruckDictionaries_GetTruckBrands2",
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "style": "form",
            "explode": true,
            "description": "Массив идентификаторов брэндов, необязательный параметр",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Список брендов ТС",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/components/schemas/TruckBrandView"
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinalExceptionView"
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/catalogs/dictionaries/truckmodels": {
      "get": {
        "tags": [
          "Словари ТС"
        ],
        "summary": "Получение словаря со всеми моделями ТС",
        "operationId": "TruckDictionaries_GetTruckModels",
        "parameters": [
          {
            "name": "brandId",
            "in": "query",
            "description": "Идентификатор брэнда, необязательный параметр",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Список моделей ТС",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/components/schemas/TruckModelView"
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinalExceptionView"
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/gw/oauth2/catalogs/v1.2/dictionaries/truckmodels": {
      "get": {
        "tags": [
          "Словари ТС"
        ],
        "summary": "Получение словаря со всеми моделями ТС",
        "operationId": "TruckDictionaries_GetTruckModels2",
        "parameters": [
          {
            "name": "brandId",
            "in": "query",
            "description": "Идентификатор брэнда, необязательный параметр",
            "schema": {
              "type": "integer",
              "format": "int32",
              "nullable": true
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Список моделей ТС",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/components/schemas/TruckModelView"
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinalExceptionView"
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/v1.2/catalogs/dictionaries/container_dimensions": {
      "get": {
        "tags": [
          "Словари ТС"
        ],
        "summary": "Получение словаря со всеми размерностями контейнера ТС",
        "operationId": "TruckDictionaries_GetContainerDimensions",
        "responses": {
          "200": {
            "description": "Список размерностей контейнера ТС",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/components/schemas/ContainerDimensionView"
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinalExceptionView"
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    },
    "/gw/oauth2/catalogs/v1.2/dictionaries/container_dimensions": {
      "get": {
        "tags": [
          "Словари ТС"
        ],
        "summary": "Получение словаря со всеми размерностями контейнера ТС",
        "operationId": "TruckDictionaries_GetContainerDimensions2",
        "responses": {
          "200": {
            "description": "Список размерностей контейнера ТС",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/components/schemas/ContainerDimensionView"
                  }
                }
              }
            }
          },
          "4XX": {
            "description": "Ошибка запроса. [Подробнее про ошибки API](https://ati.su/developers/documentation/errors/)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FinalExceptionView"
                }
              }
            }
          }
        },
        "security": [
          {
            "JWT": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "FinalExceptionView": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "error_code": {
            "type": "string",
            "description": "Код ошибки"
          },
          "reason": {
            "type": "string",
            "description": "Причина ошибки"
          }
        }
      },
      "TruckBrandView": {
        "type": "object",
        "description": "Информация о модели ТС в Справочниках",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id брэнда ТС",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Название брэнда ТС"
          },
          "name_eng": {
            "type": "string",
            "description": "Английское название брэнда ТС"
          }
        }
      },
      "TruckModelView": {
        "type": "object",
        "description": "Информация о модели ТС в Справочниках",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer",
            "description": "Id модели ТС",
            "format": "int32"
          },
          "brand": {
            "description": "Брэнд ТС",
            "oneOf": [
              {
                "$ref": "#/components/schemas/TruckBrandView"
              }
            ]
          },
          "model": {
            "type": "string",
            "description": "Модель ТС"
          },
          "kind": {
            "description": "Тип транспортного средства\n            \n* `1` — Грузовик\n* `2` — Тягач\n* `4` — Полуприцеп\n* `8` — Прицеп",
            "oneOf": [
              {
                "$ref": "#/components/schemas/TruckKinds"
              }
            ]
          }
        }
      },
      "TruckKinds": {
        "type": "integer",
        "description": "Тип транспортного средства\n            \n* `1` — Грузовик\n* `2` — Тягач\n* `4` — Полуприцеп\n* `8` — Прицеп",
        "x-enumNames": [
          "Truck",
          "Tractor",
          "Semitrailer",
          "Trailer"
        ],
        "enum": [
          1,
          2,
          4,
          8
        ]
      },
      "ContainerDimensionView": {
        "type": "object",
        "description": "Информация о размерности контейнера ТС в Справочниках",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "description": "Название размерности"
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Authorization: Bearer {authorizationToken}"
      },
      "JWT": {
        "type": "apiKey",
        "description": "Bearer {access_token}",
        "name": "Authorization",
        "in": "header"
      }
    }
  }
}