{
  "openapi": "3.0.0",
  "info": {
    "title": "api/dictionaries/firms",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "/"
    },
    {
      "url": "https://api.ati.su"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/v1.0/dictionaries/ownerships": {
      "get": {
        "tags": [
          "Справочники"
        ],
        "summary": "Получение списка ОПФ",
        "operationId": "Dictionaries_OwnShipsAll",
        "responses": {
          "200": {
            "description": "Список организационно-правовых форм",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Ownership"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1.0/firms/dictionaries/account/firmtypes": {
      "get": {
        "tags": [
          "AccountDictionaries"
        ],
        "summary": "Метод получения профилей деятельности фирм",
        "parameters": [
          {
            "name": "enableForRegistration",
            "in": "query",
            "description": "Доступность профиля при регистрации",
            "schema": {
              "type": "boolean",
              "description": "Доступность профиля при регистрации",
              "nullable": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FirmType"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Client Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1.0/firms/dictionaries/account/firmtypes/{id}": {
      "get": {
        "tags": [
          "AccountDictionaries"
        ],
        "summary": "Метод получения профилей деятельности фирм",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Идентификатор профиля фирмы",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Идентификатор профиля фирмы",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FirmType"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Client Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1.0/firms/requisites/countries": {
      "get": {
        "tags": [
          "RequisiteDictionaries"
        ],
        "summary": "Метод получения списка стран",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Country"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Client Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1.0/firms/requisites/addressparts": {
      "get": {
        "tags": [
          "RequisiteDictionaries"
        ],
        "summary": "Метод получения возможных элементов адреса",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressParts"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Client Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1.0/firms/requisites/ownerships/{countryId}": {
      "get": {
        "tags": [
          "RequisiteDictionaries"
        ],
        "summary": "Метод получения форм собственности страны",
        "parameters": [
          {
            "name": "countryId",
            "in": "path",
            "description": "Идентификатор страны",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Идентификатор страны",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Ownership"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Client Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "504": {
            "description": "Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BaseDictionaryType": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "Id": {
            "type": "integer",
            "description": "Id",
            "format": "int64"
          },
          "Id2": {
            "type": "string",
            "description": "Guid",
            "format": "guid"
          },
          "Name": {
            "type": "string",
            "description": "Название"
          }
        }
      },
      "Ownership": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseDictionaryType"
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "FullName": {
                "type": "string",
                "description": "Полное название"
              }
            }
          }
        ]
      },
      "Country": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseDictionaryType"
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "NameEng": {
                "type": "string",
                "description": "Название на английском"
              },
              "InterShortName": {
                "type": "string",
                "description": "Короткое название. Пример: Россия -&gt; RUS"
              },
              "CurrencyId": {
                "type": "integer",
                "description": "Id валюты",
                "format": "int32",
                "nullable": true
              }
            }
          }
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "nullable": true
          },
          "reason": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FirmType": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Идентификатор типа фирмы.",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Название типа",
            "nullable": true
          },
          "russian_name": {
            "type": "string",
            "description": "Название типа.",
            "nullable": true
          },
          "english_name": {
            "type": "string",
            "description": "Английское название типа.",
            "nullable": true
          },
          "enable_for_registration": {
            "type": "boolean",
            "description": "Флаг, означающий, что данный профиль деятельности доступен для выбора при регистрации."
          }
        },
        "additionalProperties": false,
        "description": "Структура \"Профиль деятельности\"."
      },
      "AddressPartItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Идентификатор элемента адреса",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Название элемента адреса",
            "nullable": true
          },
          "short_name": {
            "type": "string",
            "description": "Короткое название элемента адреса",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AddressParts": {
        "type": "object",
        "properties": {
          "street_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddressPartItem"
            },
            "description": "Коллекция типов улиц (например, проспект).",
            "nullable": true
          },
          "building_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddressPartItem"
            },
            "description": "Коллекция типов зданий (например, дом).",
            "nullable": true
          },
          "building_part_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddressPartItem"
            },
            "description": "Коллекция типов строений (например, корпус).",
            "nullable": true
          },
          "room_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddressPartItem"
            },
            "description": "Коллекция типов помещений (например, офис).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Типы адресов."
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Authorization: Bearer {authorizationToken}"
      }
    }
  }
}