{"openapi":"3.1.0","info":{"title":"Cars Base API","version":"v2","description":"REST API каталога автомобилей: марки, модели, поколения, конфигурации, модификации, характеристики, опции и файловые выгрузки."},"servers":[{"url":"https://api.cars-base.ru","description":"Production API"}],"tags":[{"name":"Каталог","description":"Табличные маршруты каталога автомобилей."},{"name":"Справочники","description":"Справочники полей и значений."},{"name":"Сервис","description":"Статус API, токен и файловые выгрузки."}],"paths":{"/marks":{"get":{"operationId":"getMarks","summary":"Получить марки","tags":["Каталог"],"security":[{"ApiToken":[]}],"parameters":[{"$ref":"#/components/parameters/Token"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/AfterId"},{"$ref":"#/components/parameters/SortBy"},{"$ref":"#/components/parameters/SortDir"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"}],"responses":{"200":{"description":"Страница данных","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/models":{"get":{"operationId":"getModels","summary":"Получить модели","tags":["Каталог"],"security":[{"ApiToken":[]}],"parameters":[{"$ref":"#/components/parameters/Token"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/AfterId"},{"$ref":"#/components/parameters/SortBy"},{"$ref":"#/components/parameters/SortDir"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"},{"name":"mark_id","in":"query","schema":{"type":"string"},"description":"Идентификатор марки, например BMW."}],"responses":{"200":{"description":"Страница данных","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/generations":{"get":{"operationId":"getGenerations","summary":"Получить поколения","tags":["Каталог"],"security":[{"ApiToken":[]}],"parameters":[{"$ref":"#/components/parameters/Token"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/AfterId"},{"$ref":"#/components/parameters/SortBy"},{"$ref":"#/components/parameters/SortDir"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"},{"name":"model_id","in":"query","schema":{"type":"string"}},{"name":"mark_id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Страница данных","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/configurations":{"get":{"operationId":"getConfigurations","summary":"Получить конфигурации","tags":["Каталог"],"security":[{"ApiToken":[]}],"parameters":[{"$ref":"#/components/parameters/Token"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/AfterId"},{"$ref":"#/components/parameters/SortBy"},{"$ref":"#/components/parameters/SortDir"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"},{"name":"generation_id","in":"query","schema":{"type":"string"}},{"name":"model_id","in":"query","schema":{"type":"string"}},{"name":"mark_id","in":"query","schema":{"type":"string"}},{"name":"body_type","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Страница данных","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/modifications":{"get":{"operationId":"getModifications","summary":"Получить модификации","tags":["Каталог"],"security":[{"ApiToken":[]}],"parameters":[{"$ref":"#/components/parameters/Token"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/AfterId"},{"$ref":"#/components/parameters/SortBy"},{"$ref":"#/components/parameters/SortDir"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"},{"name":"configuration_id","in":"query","schema":{"type":"string"}},{"name":"generation_id","in":"query","schema":{"type":"string"}},{"name":"model_id","in":"query","schema":{"type":"string"}},{"name":"mark_id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Страница данных","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/specifications":{"get":{"operationId":"getSpecifications","summary":"Получить характеристики","tags":["Каталог"],"security":[{"ApiToken":[]}],"parameters":[{"$ref":"#/components/parameters/Token"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/AfterId"},{"$ref":"#/components/parameters/SortBy"},{"$ref":"#/components/parameters/SortDir"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"}],"responses":{"200":{"description":"Страница данных","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/specifications_raw":{"get":{"operationId":"getRawSpecifications","summary":"Получить raw-характеристики","tags":["Каталог"],"security":[{"ApiToken":[]}],"parameters":[{"$ref":"#/components/parameters/Token"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/AfterId"},{"$ref":"#/components/parameters/SortBy"},{"$ref":"#/components/parameters/SortDir"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"}],"responses":{"200":{"description":"Страница данных","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/options":{"get":{"operationId":"getOptions","summary":"Получить опции","tags":["Каталог"],"security":[{"ApiToken":[]}],"parameters":[{"$ref":"#/components/parameters/Token"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/AfterId"},{"$ref":"#/components/parameters/SortBy"},{"$ref":"#/components/parameters/SortDir"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"}],"responses":{"200":{"description":"Страница данных","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TableResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/modifications/{id}/details":{"get":{"operationId":"getModificationDetails","summary":"Получить все данные модификации","tags":["Каталог"],"security":[{"ApiToken":[]}],"parameters":[{"$ref":"#/components/parameters/ModificationId"},{"$ref":"#/components/parameters/Token"}],"responses":{"200":{"description":"Модификация с характеристиками и опциями","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/dic":{"get":{"operationId":"getDictionaries","summary":"Получить все справочники","tags":["Справочники"],"responses":{"200":{"description":"Справочники","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/dic/{id}":{"get":{"operationId":"getDictionary","summary":"Получить один справочник","tags":["Справочники"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","enum":["general","body_types","specifications","specifications_raw","options"]}}],"responses":{"200":{"description":"Массив строк справочника","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/full":{"get":{"operationId":"getFullCatalog","summary":"Получить марки с вложенными моделями","tags":["Каталог"],"responses":{"200":{"description":"Каталог марок и моделей","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/status":{"get":{"operationId":"getStatus","summary":"Получить статус и дату обновления базы","tags":["Сервис"],"responses":{"200":{"description":"Статус API","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/me":{"get":{"operationId":"getCurrentToken","summary":"Проверить токен","tags":["Сервис"],"security":[{"ApiToken":[]}],"parameters":[{"$ref":"#/components/parameters/Token"}],"responses":{"200":{"description":"Информация о токене","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/download":{"get":{"operationId":"getDownloads","summary":"Получить список файлов для скачивания","tags":["Сервис"],"responses":{"200":{"description":"Список выгрузок","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/download/{filename}":{"get":{"operationId":"downloadFile","summary":"Скачать файл выгрузки","tags":["Сервис"],"security":[{"ApiToken":[]}],"parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string"},"description":"Имя файла из GET /download."},{"$ref":"#/components/parameters/Token"}],"responses":{"200":{"description":"Файл выгрузки","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Некорректный запрос","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Токен отсутствует или недействителен","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Срок ключа истёк или доступа недостаточно","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Превышен лимит запросов","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Внутренняя ошибка API","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"securitySchemes":{"ApiToken":{"type":"apiKey","in":"query","name":"token","description":"Ключ доступа или demo-токен test."}},"parameters":{"Token":{"name":"token","in":"query","required":true,"schema":{"type":"string","example":"test"}},"Page":{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},"PageSize":{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":50}},"AfterId":{"name":"after_id","in":"query","schema":{"type":"string"}},"SortBy":{"name":"sort_by","in":"query","schema":{"type":"string"}},"SortDir":{"name":"sort_dir","in":"query","schema":{"type":"string","enum":["ASC","DESC"],"default":"ASC"}},"Fields":{"name":"fields","in":"query","schema":{"type":"string","example":"id,name,cyrillic_name"}},"UpdatedAfter":{"name":"updated_after","in":"query","schema":{"type":"string","format":"date","example":"2026-07-01"}},"ModificationId":{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"BMW_3ER_G20_SEDAN_320I"}}},"schemas":{"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}},"Meta":{"type":"object","properties":{"total":{"type":["integer","null"]},"count":{"type":"integer"},"pageSize":{"type":"integer"},"page":{"type":"integer"},"after_id":{"type":["string","number","null"]},"next_after_id":{"type":["string","number","null"]},"demoMode":{"type":"boolean"},"duration_ms":{"type":"number"}},"additionalProperties":true},"TableResponse":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}},"meta":{"$ref":"#/components/schemas/Meta"}}},"ItemResponse":{"type":"object","required":["data"],"properties":{"data":{"type":["object","null"],"additionalProperties":true},"meta":{"$ref":"#/components/schemas/Meta"}}},"StatusResponse":{"type":"object","required":["counts"],"properties":{"last_update":{"type":"string","format":"date-time"},"counts":{"type":"object","additionalProperties":{"type":"integer"},"properties":{"marks":{"type":"integer"},"models":{"type":"integer"},"generations":{"type":"integer"},"configurations":{"type":"integer"},"modifications":{"type":"integer"}}}},"additionalProperties":true}}}}