{"openapi": "3.0.3", "info": {"title": "SUDRF API", "version": "1.0.0", "description": "SUDRF API (продукт KAZNA TECH) — получение карточек судебных дел судов общей юрисдикции и мировых судей России в едином структурированном формате.\n\n🔑 **Авторизация.** Доступ к методам данных — по индивидуальному токену. Токен передаётся в теле запроса полем `token`. Не публикуйте токен и используйте только HTTPS. Запросить токен: https://t.me/apisud_bot"}, "servers": [{"url": "http://127.0.0.1:8232"}], "tags": [{"name": "Дела", "description": "Получение карточек судебных дел (требуется токен)"}, {"name": "Справочники", "description": "Список судов и ключей"}, {"name": "Статус", "description": "Состояние обработки"}], "components": {"schemas": {"Side": {"type": "object", "properties": {"sideType": {"oneOf": [{"type": "string"}, {"type": "integer"}]}, "nameSide": {"type": "string"}, "inn": {"type": "string"}, "kpp": {"type": "string"}, "ogrn": {"type": "string"}, "ogrnip": {"type": "string"}}, "additionalProperties": true}, "Event": {"type": "object", "properties": {"title": {"type": "string"}, "date": {"type": "string"}, "time": {"type": "string"}, "place": {"type": "string"}, "resultEvent": {"type": "string"}, "basis": {"type": "string"}, "note": {"type": "string"}, "pubDate": {"type": "string"}, "datetime": {"type": "string", "format": "date-time"}, "msk_datetime": {"type": "string", "format": "date-time"}}, "additionalProperties": true}, "Card": {"type": "object", "description": "Нормализованная карточка дела (Case.data_en)", "properties": {"title": {"type": "string"}, "meta": {"type": "array", "items": {"type": "string"}}, "case_number": {"type": "string"}, "case": {"type": "object", "additionalProperties": true}, "sides": {"type": "array", "items": {"$ref": "#/components/schemas/Side"}}, "events": {"type": "array", "items": {"$ref": "#/components/schemas/Event"}}, "documents": {"type": "array", "items": {"type": "object", "additionalProperties": true}}, "instance": {"type": "integer"}, "type": {"type": "string"}, "id": {"type": "integer"}}, "additionalProperties": true}, "CardDetailRequest": {"type": "object", "required": ["case_link", "token"], "properties": {"case_link": {"type": "string", "format": "uri", "description": "Ссылка на дело на сайте суда"}, "token": {"type": "string", "description": "Индивидуальный токен доступа"}, "force": {"type": "boolean", "description": "Принудительно перезапустить обработку (в т.ч. для not_found)"}}}, "SearchRequest": {"type": "object", "required": ["case_number", "token"], "properties": {"case_number": {"type": "string", "description": "Номер дела"}, "token": {"type": "string", "description": "Индивидуальный токен доступа"}, "courts": {"type": "array", "items": {"type": "string"}, "description": "Список доменов судов для поиска (опционально)"}}}}}, "paths": {"/api/search/card": {"post": {"tags": ["Дела"], "summary": "Карточка дела по ссылке", "description": "Возвращает нормализованную карточку дела по ссылке. Если дело новое — ставит на обработку (status=parse_cards).\n\n🔑 Доступ к методам данных — по индивидуальному токену. Токен передаётся в теле запроса полем `token`. Не публикуйте токен и используйте только HTTPS. Запросить токен: https://t.me/apisud_bot", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CardDetailRequest"}}}}, "responses": {"200": {"description": "Карточка или промежуточный статус", "content": {"application/json": {"schema": {"type": "object"}}}}, "400": {"description": "Неверный токен/ссылка/источник"}, "405": {"description": "Метод не разрешён (нужен POST)"}}}}, "/api/search": {"post": {"tags": ["Дела"], "summary": "Поиск дел по номеру", "description": "Поиск дел по номеру (опционально по выбранным судам).\n\n🔑 Доступ к методам данных — по индивидуальному токену. Токен передаётся в теле запроса полем `token`. Не публикуйте токен и используйте только HTTPS. Запросить токен: https://t.me/apisud_bot", "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SearchRequest"}}}}, "responses": {"200": {"description": "Найденные дела и статус"}, "400": {"description": "Неверный токен/параметры"}}}}, "/api/court/list": {"get": {"tags": ["Справочники"], "summary": "Список судов", "parameters": [{"name": "links", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Если задан — включить ссылки поиска"}], "responses": {"200": {"description": "Список судов: domain, kind, name"}}}}, "/api/court/keys-detail": {"get": {"tags": ["Справочники"], "summary": "Словарь ключей нормализации", "parameters": [{"name": "filter", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Фильтр по output_data"}], "responses": {"200": {"description": "Список соответствий ключей"}}}}, "/api/status-update": {"get": {"tags": ["Статус"], "summary": "Сводный статус обработки", "responses": {"200": {"description": "not_updated / parsing_now / unavailable_now"}}}}}}