{"openapi":"3.1.0","info":{"title":"AI-BELARUS API","contact":{"name":"ООО «Тендерные машины» — служба AI-BELARUS","url":"https://ai-belarus.by/","email":"6955400@gmail.com"},"version":"1.20.0"},"paths":{"/health/live":{"get":{"summary":"Live","operationId":"live_health_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthLive"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/health/ready":{"get":{"summary":"Ready","description":"Готовность СЛУЖБЫ, а не живость соединения.\n\n⛔ ПРОЖИТО 10.09.2026 ЖИВЫМ ОПЫТОМ. Прежняя проверка делала `db_ping()` — то есть\nспрашивала «отвечает ли база», — и на ПУСТОЙ базе отвечала 200 «ready». Тут же первый\nзапрос данных падал: `UndefinedTable: relation \"entities\" does not exist`. При\nпостепенной выкатке балансировщик направил бы поток на немигрированный узел, и тот\nпринял бы его с видом здорового. Проверка обязана спрашивать про ПРЕДМЕТ.","operationId":"ready_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthReady"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/public/search":{"get":{"summary":"Public Search","operationId":"public_search_v1_public_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":25,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/public/entities/{entity_id}":{"get":{"summary":"Public Entity","operationId":"public_entity_v1_public_entities__entity_id__get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/catalog/stats":{"get":{"summary":"Stats","operationId":"stats_v1_catalog_stats_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/entities/{entity_id}":{"get":{"summary":"Entity","operationId":"entity_v1_entities__entity_id__get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"official_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Official Only"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/entities/{entity_id}/audit-packet":{"get":{"summary":"Entity Audit Packet","operationId":"entity_audit_packet_v1_entities__entity_id__audit_packet_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"as_of","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/entities/{entity_id}/snapshot":{"get":{"summary":"Entity Snapshot","operationId":"entity_snapshot_v1_entities__entity_id__snapshot_get","parameters":[{"name":"entity_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entity Id"}},{"name":"as_of","in":"query","required":true,"schema":{"type":"string","title":"As Of"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/search":{"get":{"summary":"Search","operationId":"search_v1_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/ai/context":{"get":{"summary":"Ai Context","description":"Выдача для машины. ⭐ `as_of` добавлен 10.09.2026: без него ответ невоспроизводим.\n\n⛔ Прежде единственный эндпойнт, объявленный «для агента», не умел закрепить время и\nне нёс отпечатка ответа. Сослаться на конкретный ответ было нечем: ни агент не мог\nдоказать, что ему так ответили, ни служба — что она так ответила.","operationId":"ai_context_v1_ai_context_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":1,"default":10,"title":"Limit"}},{"name":"official_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Official Only"}},{"name":"as_of","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiContextResponse"}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/meta/coverage":{"get":{"summary":"Meta Coverage","description":"Заявление системы О САМОЙ СЕБЕ: что она охватывает и чего не вправе.\n\n⭐ ЗАВЕДЕНО 10.09.2026. Прежде машина не могла узнать границы системы, НЕ ЗАДАВ\nвопроса по существу: охват выяснялся перебором. Это дорого и ненадёжно — отсутствие\nответа на конкретный вопрос не говорит, входит ли предмет в охват вообще.\n\n⛔ Открыт БЕЗ КЛЮЧА намеренно. Границы собственного знания — не секрет; скрывать их\nзначило бы заставлять потребителя догадываться о них по выдаче, то есть ровно то, от\nчего мы уходим.","operationId":"meta_coverage_v1_meta_coverage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaCoverage"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/meta/vocabulary":{"get":{"summary":"Meta Vocabulary","description":"Словарь ответа проверки контрагента: поля, три исхода, измеренные состояния реестра.\n\nОткрыт без ключа: машина не должна угадывать значения по форме ответа, а состояния\nреестра берутся из того же словаря, по которому строится вывод «действует».","operationId":"meta_vocabulary_v1_meta_vocabulary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaVocabulary"}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/public/by-unp/{unp}":{"get":{"summary":"Public Entity By Unp","description":"Публичная карточка по УНП — то же, что `/v1/public/entities/{id}`, но по ключу,\nпо которому субъекта знает мир. Сведений из нашей базы, без обращения к реестру.","operationId":"public_entity_by_unp_v1_public_by_unp__unp__get","parameters":[{"name":"unp","in":"path","required":true,"schema":{"type":"string","title":"Unp"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/meta/signing-key":{"get":{"summary":"Meta Signing Key","description":"Открытый ключ, которым проверяется подпись аудит-пакета.\n\n⭐ ЗАВЕДЕНО ПО ДЕФЕКТУ: пакет нёс `\"signature\": None`, то есть машина умела\nдоказать соответствие нагрузки ИМЕЮЩЕМУСЯ У НЕЁ хешу, но не то, что хеш выдан\nAI-BELARUS. Подпись без общедоступного ключа проверки была бы тем же дефектом\nв новой одежде: заверение, которое некому проверить.\n\n⛔ Открыт БЕЗ КЛЮЧА ДОСТУПА намеренно — открытый ключ на то и открытый. Прятать\nего значило бы требовать учётных данных у того, кто как раз нам НЕ доверяет и\nпотому проверяет; проверяющий, вынужденный сперва завести у нас счёт, проверяет\nуже не нас.\n\n⚠ Ключа может не быть — тогда `status` = \"unsigned\" с НАЗВАННОЙ причиной, а не\nотказ и не молчание. Отсутствие заверения есть состояние, о котором обязаны\nсообщить, а не повод уронить выдачу.","operationId":"meta_signing_key_v1_meta_signing_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/artifacts/{content_hash}/bytes":{"get":{"summary":"Artifact Bytes","description":"⭐ Отдать СЫРЫЕ БАЙТЫ артефакта — те самые, что прислал держатель реестра.\n\n⛔ ПОВОД. Отпечаток `content_hash` был у каждой улики и каждого артефакта, а способа\nПОЛУЧИТЬ содержимое и проверить этот отпечаток — не было ни одного. Машина обязана\nбыла принять число на веру. ⇒ Происхождение оставалось декларацией: «вот отпечаток,\nповерьте, что он от тех байтов».\n\n⚠ Отдаются байты КАК ЕСТЬ, `application/octet-stream`, без разбора и без изменений —\nиначе отпечаток не сойдётся, а сойтись он обязан побайтово. Отпечаток возвращается\nзаголовком, чтобы сверять, не читая тело дважды.\n\n⛔ Это ЧУЖОЙ ТЕКСТ, написанный держателем реестра. Он не инструкция и не должен\nпопадать в исполнение: заголовки запрещают браузеру угадывать тип и показывать\nсодержимое как страницу.","operationId":"artifact_bytes_v1_artifacts__content_hash__bytes_get","parameters":[{"name":"content_hash","in":"path","required":true,"schema":{"type":"string","title":"Content Hash"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/packets/{payload_sha256}":{"get":{"summary":"Packet By Hash","description":"⭐ Получить ранее выданный аудит-пакет ПО ЕГО ОТПЕЧАТКУ.\n\n⛔ ПОВОД. Пакет хешировался, самопроверялся и хранился по `payload_sha256` — но\nмаршрута выборки по этому отпечатку НЕ БЫЛО. Машина держала число и не могла\nпопросить «отдай мне вот этот ответ». ⇒ Сослаться на конкретный пакет было можно,\nполучить его — нельзя, и вся ссылочность оставалась на словах.\n\n⚠ Отдаётся ХРАНИМЫЙ артефакт, а не пересобранный заново. Пересборка «по тем же\nданным» дала бы сегодняшнее мнение о вчерашнем предмете: время идёт, сведения\nменяются, и совпадение отпечатка перестало бы что-либо доказывать.","operationId":"packet_by_hash_v1_packets__payload_sha256__get","parameters":[{"name":"payload_sha256","in":"path","required":true,"schema":{"type":"string","title":"Payload Sha256"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/subject/by-unp/{unp}":{"get":{"summary":"Subject By Unp","description":"⭐ Проверить ЛЮБОЕ зарегистрированное лицо РБ — юридическое или ИП — по УНП.\n\n⛔ ЗАЧЕМ ЖИВОЕ ОБРАЩЕНИЕ, А НЕ КОПИЯ РЕЕСТРА. В реестрах сотни тысяч субъектов, а темп\nобращения к держателю — не чаще раза в две-три секунды: полный обход занял бы месяцы\nи был бы неуважением к чужой машине. ⇒ Не хранить всё, а уметь спросить про любого.\nПокрытие получается полным, а копия не нужна.\n\n⛔ ЧТО ЭТОТ ОТВЕТ НЕ ЕСТЬ. Он НЕ является опубликованным утверждением системы. Это\nНАБЛЮДЕНИЕ, сделанное сейчас: сведения держателя, снятые в названный момент, с\nотпечатком сырого ответа. Каноническим утверждением оно становится отдельным\nдействием (проверка, разрешение конфликтов, публикация), и выдавать наблюдение за\nутверждение нельзя — на этом различении стоит весь проект.\n\n⚠ `deep=true` добирает остальные методы ЕГР. По умолчанию НЕ добирает: восемь методов\nпри паузе в три секунды — это больше двадцати секунд ожидания, и нужны они не всегда.","operationId":"subject_by_unp_v1_subject_by_unp__unp__get","parameters":[{"name":"unp","in":"path","required":true,"schema":{"type":"string","title":"Unp"}},{"name":"deep","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Deep"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"502":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Gateway"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/counterparty/{unp}":{"get":{"summary":"Counterparty Check","description":"⭐ ПРОВЕРИТЬ КОНТРАГЕНТА: ответ на вопрос, а не выход двигателя.\n\n⛔ ЗАЧЕМ ОТДЕЛЬНО ОТ `/v1/subject/by-unp/`. Тот маршрут отдаёт двенадцать полей\nверхнего уровня, из которых одиннадцать — служебная обвязка, а сам ответ закопан в\n`sources[\"BY:MNS:GRP\"][\"row\"]`. Это выход ДВИГАТЕЛЯ, и он нужен — но человеку и\nмашине, готовящим заявку, нужен ОТВЕТ.\n\n⭐ И ВОПРОС ЗДЕСЬ ДРУГОЙ, А НЕ ТОТ ЖЕ САМЫЙ ПОКОРОЧЕ. Карточку компании отдаст и сайт\nдержателя. Настоящее действие человека с договором на руках: у него УЖЕ ЕСТЬ УНП и\nнаименование, и ему нужно знать, СХОДЯТСЯ ЛИ они с реестром. Передайте `?name=…` — и\nсверка будет сделана, а способ сравнения назван.\n\n⛔ ОЦЕНОК ЗДЕСЬ НЕТ И НЕ БУДЕТ: ни «надёжный», ни баллов, ни процентов, ни\nрекомендаций. Число, которого никто не мерил, убедительнее измеренного — тем и опасно.\n\n⚠ Ответ остаётся НАБЛЮДЕНИЕМ, снятым сейчас, а не утверждением системы; доказательство\nдержателя (адрес, момент, отпечаток) едет в разделе `доказательство` и никуда не\nдевается — оно просто перестаёт быть первым, что видно.","operationId":"counterparty_check_v1_counterparty__unp__get","parameters":[{"name":"unp","in":"path","required":true,"schema":{"type":"string","title":"Unp"}},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"502":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Gateway"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/counterparty/batch":{"post":{"summary":"Counterparty Batch","description":"⭐ ПРОВЕРИТЬ СПИСОК КОНТРАГЕНТОВ. То, ради чего продукт и нужен.\n\nУ человека, готовящего заявку, контрагентов десятки. Сверять их по одному — самая\nскучная работа подготовки документов.\n\n⛔⛔ ЭТО НЕ ВЫГРУЗКА РЕЕСТРА, И РАЗЛИЧИЕ В УСТРОЙСТВЕ, А НЕ В НАЗВАНИИ. Принимается\nТОЛЬКО именованный список УНП: выразить «дайте всё» нечем — ни диапазона, ни фильтра,\nни курсора. Каждый субъект проходит ТЕ ЖЕ одиночные ворота, и каждое решение ложится в\nжурнал предоставлений отдельно. `bulk` закрыт и остаётся закрытым.\n\n⚠ ОТВЕЧАЕТ ЗАДАНИЕМ, А НЕ ОТВЕТОМ. Пауза к держателю не меньше трёх секунд и общая на\nпроцесс; пятьдесят субъектов — две с половиной минуты, которых HTTP-запрос не\nпереживёт. ⛔ Убрать паузу нельзя: это не наша вежливость, а условие, на котором\nдержатель нас терпит.\n\nТело: `{\"items\": [\"100316761\", {\"unp\": \"...\", \"name\": \"как в договоре\"}]}`","operationId":"counterparty_batch_v1_counterparty_batch_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Bad Request"},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/counterparty/batch/{job_id}":{"get":{"summary":"Counterparty Batch State","description":"Состояние задания и готовые ответы.\n\n⛔ ОТДАЁТСЯ ТОЛЬКО ТОМУ ЖЕ ПОЛУЧАТЕЛЮ, ЧТО СОЗДАВАЛ. Иначе задание, поставленное\nвнутренним ключом, забиралось бы клиентским — и правá подменялись бы между\nпостановкой и выдачей.","operationId":"counterparty_batch_state_v1_counterparty_batch__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"404":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not Found"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/client-keys":{"post":{"summary":"Issue Client Key","description":"⭐ ВЫДАТЬ КЛЮЧ КЛИЕНТУ. Дверь, которой у продукта не было до 11.09.2026.\n\n⛔ ЗАМЕР, РАДИ КОТОРОГО ЗАВЕДЕНО: войти мог только обладатель `AI_BELARUS_API_KEY`, и\nон же объявлялся внутренним ⇒ клиентская ветка ворот была НЕДОСТИЖИМА. Право\nпоказывать наименование юрлица клиенту доказано — а выдать клиенту ключ было нечем.\n\n⛔ КЛЮЧ ПОКАЗЫВАЕТСЯ ОДИН РАЗ и больше не доступен нигде: хранится только отпечаток.\n⚠ ВЫДАЧА КЛЮЧА — ПРАВОВОЕ ДЕЙСТВИЕ, а не техническое: с этого мгновения сведения\nначинают уходить третьему лицу, и каждое такое предоставление ложится в журнал по\nстатье 12 Закона 99-З.","operationId":"issue_client_key_v1_admin_client_keys_post","parameters":[{"name":"client_name","in":"query","required":true,"schema":{"type":"string","title":"Client Name"}},{"name":"note","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Client Keys","description":"Кому выдавали доступ. ⛔ Самих ключей здесь нет и быть не может.","operationId":"list_client_keys_v1_admin_client_keys_get","parameters":[{"name":"include_revoked","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Revoked"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/client-keys/{hint}":{"delete":{"summary":"Revoke Client Key","description":"Отозвать ключ. ⛔ Отзыв — ДАТА, а не удаление записи.\n\n⚠ Удалённый ключ отвечает на вопрос «кому мы давали доступ» словом «никому», и разбор\nпроисшествия становится невозможен.","operationId":"revoke_client_key_v1_admin_client_keys__hint__delete","parameters":[{"name":"hint","in":"path","required":true,"schema":{"type":"string","title":"Hint"}},{"name":"why","in":"query","required":false,"schema":{"type":"string","default":"не указано","title":"Why"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/rights":{"get":{"summary":"Rights Notice","description":"⭐ РАЗЪЯСНЕНИЕ ПРАВ СУБЪЕКТА ПЕРСОНАЛЬНЫХ ДАННЫХ (99-З, ст. 16).\n\n⛔ СОБИРАЕТСЯ ИЗ ЖИВЫХ ВЕЛИЧИН СИСТЕМЫ, а не пишется рядом с ней: сроки берутся\nоттуда же, откуда ими пользуется код. Написанное отдельно разъяснение разошлось бы с\nповедением при первой правке — и разошлось бы МОЛЧА.\n⚠ Неверное разъяснение прав хуже отсутствующего: человек, поверивший обещанному\nсроку, пропустит свой настоящий.\n\n⛔ Здесь НЕ ОБЕЩАЕТСЯ то, чего мы не делаем: у каждого права честное состояние —\nобслуживается, снято нормой либо не обслуживается.","operationId":"rights_notice_v1_rights_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"429":{"description":"Too Many Requests","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"Internal Server Error","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Service Unavailable","content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/admin/selfcheck":{"get":{"summary":"Admin Selfcheck","description":"⭐ ЧТО СИСТЕМА ЗНАЕТ О СЕБЕ — И ЧЕГО О СЕБЕ НЕ ЗНАЕТ.\n\n⛔ ПОВОД: 11.09.2026 выяснилось, что копий базы не было ЗА ВСЮ ЖИЗНЬ ПРОДАКШНА, и\nнашлось это РУКАМИ, а не сторожем. Система не знала о себе ничего.\n⚠ И это уже обязанность: 99-З, ст. 16 даёт три рабочих дня на уведомление о нарушении\nзащиты «после того, как стало известно». Срок течёт от момента ЗНАНИЯ — а узнать было\nнечем.\n\n⛔ ТРИ ИСХОДА, А НЕ ДВА, и «не установлено» НЕ засчитывается за здоровье: именно так и\nпоявляются панели, сплошь зелёные при мёртвой системе.","operationId":"admin_selfcheck_v1_admin_selfcheck_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/quality/summary":{"get":{"summary":"Quality Summary","operationId":"quality_summary_v1_admin_quality_summary_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/sources":{"get":{"summary":"Sources","operationId":"sources_v1_admin_sources_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/admin/snapshots/latest":{"get":{"summary":"Latest Snapshot","operationId":"latest_snapshot_v1_admin_snapshots_latest_get","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"403":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Forbidden"},"401":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Unauthorized"},"429":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Too Many Requests"},"500":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Internal Server Error"},"503":{"content":{"application/problem+json":{},"application/json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Service Unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Absence":{"properties":{"reason":{"type":"string","title":"Reason","description":"no_such_entity | not_at_as_of | withheld_by_policy | not_covered | retrieval_degraded | unknown"},"detail":{"type":"string","title":"Detail","default":""},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of"},"supports_negative_inference":{"type":"boolean","title":"Supports Negative Inference","description":"⛔ Можно ли из этого молчания заключить, что искомого нет. Истинно РОВНО в одном случае — когда искали полноценно и не нашли"}},"type":"object","required":["reason","supports_negative_inference"],"title":"Absence","description":"Почему здесь пусто. ⛔ Причина из закрытого словаря `epistemics.ABSENCE_REASONS`."},"AiContextResponse":{"properties":{"query":{"type":"string","title":"Query"},"result_count":{"type":"integer","title":"Result Count"},"entities":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Entities","description":"⚠ Пакеты сущностей собираются из базы и меняются вместе со схемой. Форма объявлена свободной НАМЕРЕННО: выдуманная здесь схема была бы хуже её отсутствия — машина поверила бы описанию"},"retrieval_only":{"type":"boolean","title":"Retrieval Only","default":true},"retrieval_manifest":{"additionalProperties":true,"type":"object","title":"Retrieval Manifest"},"coverage":{"$ref":"#/components/schemas/Coverage"},"does_not_establish":{"items":{"type":"string"},"type":"array","title":"Does Not Establish","description":"⭐ Чего этот ответ НЕ утверждает. Выводится из состояния, а не из шаблона: каждый пункт добавлен по условию"},"absence":{"anyOf":[{"$ref":"#/components/schemas/Absence"},{"type":"null"}],"description":"Присутствует, если пусто"},"policy":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Policy","description":"⚠ ОПИСАНИЕ КОНТРАКТА, а не измерение. Это постоянные свойства эндпойнта; измеренное про данный ответ лежит в coverage"},"determinism":{"$ref":"#/components/schemas/Determinism"},"audit_recorded":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Audit Recorded"}},"type":"object","required":["query","result_count","entities","retrieval_manifest","coverage","does_not_establish","policy","determinism"],"title":"AiContextResponse","description":"Выдача для машины."},"Coverage":{"properties":{"contract":{"type":"string","title":"Contract","default":"aib-coverage-v1"},"sources_consulted":{"items":{"$ref":"#/components/schemas/SourceConsulted"},"type":"array","title":"Sources Consulted","default":[]},"corpus_as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Corpus As Of"},"corpus_as_of_known":{"type":"boolean","title":"Corpus As Of Known","description":"⚠ Ложь означает «мы не знаем, насколько свежи наши сведения». Это не то же самое, что «сведения свежие»"},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of"},"as_of_pinned":{"type":"boolean","title":"As Of Pinned"},"retrieval":{"$ref":"#/components/schemas/RetrievalDiagnosis"},"filters_applied":{"items":{"$ref":"#/components/schemas/FilterApplied"},"type":"array","title":"Filters Applied","default":[]},"legal_layer":{"$ref":"#/components/schemas/LegalLayerState"}},"type":"object","required":["corpus_as_of_known","as_of_pinned","retrieval","legal_layer"],"title":"Coverage","description":"Что именно было просмотрено, чтобы получить этот ответ.\n\n⛔ БЕЗ ЭТОГО БЛОКА ПУСТОЙ ОТВЕТ НЕ ЗНАЧИТ НИЧЕГО: «посмотрели и не нашли» и «никуда\nне смотрели» приходили одной строкой, и вывод из них разный, а различить было нельзя."},"Determinism":{"properties":{"response_sha256":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Sha256","description":"Отпечаток каноничных байтов ответа. ⛔ `null` означает, что вычислить его не удалось — значение НЕ подставляется наугад: отпечаток, который может оказаться неверным, хуже отсутствующего"},"fingerprint_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fingerprint Status","description":"ok либо fingerprint_failed:<причина>"},"canonicalization":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonicalization","description":"⚠ Профиль сериализации, по которому считан отпечаток. Без него независимый пересчёт есть гадание"},"excluded_from_hash":{"items":{"type":"string"},"type":"array","title":"Excluded From Hash","description":"⛔ Поля, НЕ покрытые отпечатком. Умолчание о них обесценило бы отпечаток целиком: пересчёт не сошёлся бы, и машина решила бы, что ответ подменён"},"reproducible":{"type":"boolean","title":"Reproducible","description":"Обещана ли повторяемость. Истинно только при закреплённом as_of"},"why":{"type":"string","title":"Why"}},"type":"object","required":["response_sha256","excluded_from_hash","reproducible","why"],"title":"Determinism","description":"Можно ли сослаться на этот ответ и позже доказать, что он был таким.\n\n⛔ Прежде у выдачи для агента не было отпечатка вовсе, а `generated_at: now()` делал\nбайты различными при каждом вызове. Сослаться было нечем ни агенту, ни самой службе."},"FilterApplied":{"properties":{"filter":{"type":"string","title":"Filter"},"removed_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Removed Count"},"counted":{"type":"boolean","title":"Counted"}},"type":"object","required":["filter","counted"],"title":"FilterApplied","description":"Что было срезано из ответа. ⚠ `counted: false` означает «не считали», а не «ноль»."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthLive":{"properties":{"status":{"type":"string","title":"Status"},"service":{"type":"string","title":"Service"},"version":{"type":"string","title":"Version"}},"type":"object","required":["status","service","version"],"title":"HealthLive"},"HealthReady":{"properties":{"status":{"type":"string","title":"Status"},"database":{"type":"string","title":"Database"},"config":{"type":"string","title":"Config"},"schema":{"type":"string","title":"Schema"},"legal_layer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Layer"}},"type":"object","required":["status","database","config","schema"],"title":"HealthReady","description":"⛔ Готовность СЛУЖБЫ. Прежде проверялось соединение с базой, и на ПУСТОЙ схеме\nответ был «ready», а первый же запрос данных падал."},"LegalLayerState":{"properties":{"available":{"type":"boolean","title":"Available"},"reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Code"},"why":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Why"},"channels_loaded":{"type":"integer","title":"Channels Loaded","default":0},"policies_loaded":{"type":"integer","title":"Policies Loaded","default":0}},"type":"object","required":["available"],"title":"LegalLayerState","description":"Состояние правового слоя в ЭТОЙ сборке.\n\n⚠ `available: false` НЕ ОЗНАЧАЕТ «ограничений нет». Оно означает, что права не\nпроверялись. Прежде правового слоя не было в образе вовсе, и приложение отдавало\nсведения, чьё основание в контейнере отсутствовало даже в виде файлов."},"MetaCoverage":{"properties":{"contract":{"type":"string","title":"Contract"},"service":{"type":"string","title":"Service"},"version":{"type":"string","title":"Version"},"generated_at":{"type":"string","title":"Generated At"},"database_reachable":{"type":"boolean","title":"Database Reachable"},"counts":{"additionalProperties":true,"type":"object","title":"Counts"},"sources":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Sources"},"legal_layer":{"$ref":"#/components/schemas/LegalLayerState"},"absence_reasons":{"items":{"type":"string"},"type":"array","title":"Absence Reasons"},"error_codes":{"additionalProperties":true,"type":"object","title":"Error Codes"},"does_not_establish":{"items":{"type":"string"},"type":"array","title":"Does Not Establish"}},"type":"object","required":["contract","service","version","generated_at","database_reachable","counts","sources","legal_layer","absence_reasons","error_codes","does_not_establish"],"title":"MetaCoverage","description":"Заявление системы о самой себе: охват, права, словарь отказов.\n\n⭐ Открыт без ключа: границы собственного знания не секрет, и выяснять их перебором\nзапросов дорого и ненадёжно."},"MetaVocabulary":{"properties":{"contract":{"type":"string","title":"Contract"},"generated_at":{"type":"string","title":"Generated At"},"answer_fields":{"additionalProperties":{"type":"string"},"type":"object","title":"Answer Fields"},"outcomes":{"additionalProperties":{"type":"string"},"type":"object","title":"Outcomes"},"registry_states_measured":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Registry States Measured"},"field_predicates":{"additionalProperties":{"type":"string"},"type":"object","title":"Field Predicates"},"match_outcomes":{"additionalProperties":{"type":"string"},"type":"object","title":"Match Outcomes"},"does_not_establish":{"items":{"type":"string"},"type":"array","title":"Does Not Establish"}},"type":"object","required":["contract","generated_at","answer_fields","outcomes","registry_states_measured","field_predicates","match_outcomes","does_not_establish"],"title":"MetaVocabulary","description":"Словарь ответа проверки контрагента: поля, исходы, измеренные состояния реестра.\n\nОткрыт без ключа: машина не должна угадывать значения по форме ответа."},"Problem":{"properties":{"type":{"type":"string","title":"Type","description":"URI вида https://ai-belarus.by/problems/<code>"},"code":{"type":"string","title":"Code","description":"Машинный код из закрытого словаря"},"title":{"type":"string","title":"Title","description":"Короткое название на русском"},"status":{"type":"integer","title":"Status"},"retryable":{"type":"boolean","title":"Retryable","description":"Имеет ли смысл повторить запрос. ⛔ Отличает «не готов» (да) от «ключи на сервере не настроены» (нет) — прежде оба были 503"},"why":{"type":"string","title":"Why","description":"Почему так вышло"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["type","code","title","status","retryable","why"],"title":"Problem","description":"Отказ по RFC 9457 с нашим машинным кодом.\n\n⛔ Поле `code` — из закрытого словаря `errors.CATALOG`. Свободную строку разобрать\nнельзя, а по ней прежде приходилось различать «ключа нет» и «ключ неверен»."},"RetrievalDiagnosis":{"properties":{"backend":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Backend"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode","description":"full_text_index | substring_only | degraded_fallback"},"degraded":{"type":"boolean","title":"Degraded","description":"Указатель настроен и НЕ ОТВЕТИЛ — это поломка"},"degraded_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Degraded Reason"},"recall_limited":{"type":"boolean","title":"Recall Limited","description":"Находит меньше, чем полноценный поиск"},"absence_is_informative":{"type":"boolean","title":"Absence Is Informative","description":"⛔ Значит ли что-нибудь пустой результат. Ложь ⇒ вывод об отсутствии делать НЕЛЬЗЯ"}},"type":"object","required":["degraded","recall_limited","absence_is_informative"],"title":"RetrievalDiagnosis","description":"Каким способом искали и чем ограничена полнота.\n\n⛔ Прежде здесь был один булев флаг, и он отвечал на другой вопрос: «настроен ли\nуказатель» вместо «ослаблен ли поиск». При поиске подстрокой наружу шло\n«не деградировано», и пустой ответ читался как доказательство отсутствия."},"SearchResponse":{"properties":{"results":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Results"},"search_backend":{"type":"string","title":"Search Backend"},"degraded_search":{"type":"boolean","title":"Degraded Search"},"epistemic_policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Epistemic Policy"},"data_boundary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Data Boundary"},"coverage":{"$ref":"#/components/schemas/Coverage"},"does_not_establish":{"items":{"type":"string"},"type":"array","title":"Does Not Establish"}},"type":"object","required":["results","search_backend","degraded_search","coverage","does_not_establish"],"title":"SearchResponse"},"SourceConsulted":{"properties":{"source_id":{"type":"string","title":"Source Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tier"},"disclosure_state":{"type":"string","title":"Disclosure State"}},"type":"object","required":["source_id","disclosure_state"],"title":"SourceConsulted"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}