{"openapi":"3.1.0","info":{"title":"USPY API","description":"Внутренний API-first сервис проверки контрагентов, санкционного скрининга, мониторинга и webhook-интеграций.","version":"0.1.0"},"paths":{"/api/v1/health":{"get":{"tags":["health"],"summary":"Service liveness","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Api V1 Health Get"}}}}}}},"/api/v1/ready":{"get":{"tags":["health"],"summary":"Readiness: DB connectivity","operationId":"ready_api_v1_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Ready Api V1 Ready Get"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","operationId":"refresh_api_v1_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","operationId":"logout_api_v1_auth_logout_post","responses":{"204":{"description":"Successful Response"}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Me","operationId":"me_api_v1_auth_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/change-password":{"post":{"tags":["auth"],"summary":"Change Password","operationId":"change_password_api_v1_auth_change_password_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/oauth/providers":{"get":{"tags":["auth"],"summary":"Oauth Providers","description":"Lets the web UI know which SSO buttons to render.","operationId":"oauth_providers_api_v1_auth_oauth_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthProviders"}}}}}}},"/api/v1/auth/oauth/microsoft/start":{"get":{"tags":["auth"],"summary":"Microsoft Start","operationId":"microsoft_start_api_v1_auth_oauth_microsoft_start_get","parameters":[{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/oauth/microsoft/callback":{"get":{"tags":["auth"],"summary":"Microsoft Callback","operationId":"microsoft_callback_api_v1_auth_oauth_microsoft_callback_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","default":"","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"","title":"State"}},{"name":"error","in":"query","required":false,"schema":{"type":"string","default":"","title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"type":"string","default":"","title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/search":{"get":{"tags":["companies"],"summary":"Search counterparties","description":"Hybrid search per TZ §8.4 / §11.\n\n- Numeric input matching ЕДРПОУ (8 digits) or РНОКПП (10 digits) → exact lookup\n  (РНОКПП is hashed before comparison; the cleartext never touches the DB).\n- Otherwise → trigram similarity on normalized name (pg_trgm gin index).","operationId":"search_api_v1_companies_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200,"title":"Q"}},{"name":"country","in":"query","required":false,"schema":{"type":"string","default":"UA","title":"Country"}},{"name":"type","in":"query","required":false,"schema":{"enum":["company","person","fop","all"],"type":"string","default":"all","title":"Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/{country}/{identifier}":{"get":{"tags":["companies"],"summary":"Counterparty card","operationId":"get_company_api_v1_companies__country___identifier__get","parameters":[{"name":"country","in":"path","required":true,"schema":{"type":"string","title":"Country"}},{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyCard"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/{country}/{identifier}/modules/{module}":{"get":{"tags":["companies"],"summary":"Counterparty module data (overview only for now)","operationId":"get_module_api_v1_companies__country___identifier__modules__module__get","parameters":[{"name":"country","in":"path","required":true,"schema":{"type":"string","title":"Country"}},{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"module","in":"path","required":true,"schema":{"type":"string","title":"Module"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Module Api V1 Companies  Country   Identifier  Modules  Module  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/companies/{country}/{identifier}/relations":{"get":{"tags":["companies"],"summary":"Counterparty relations as list (TZ §8.6)","operationId":"get_relations_api_v1_companies__country___identifier__relations_get","parameters":[{"name":"country","in":"path","required":true,"schema":{"type":"string","title":"Country"}},{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"type","in":"query","required":false,"schema":{"type":"string","description":"all | officer | owner | beneficiary | sanctions | pep","default":"all","title":"Type"},"description":"all | officer | owner | beneficiary | sanctions | pep"},{"name":"include","in":"query","required":false,"schema":{"enum":["current","historical","all"],"type":"string","description":"current = relation_status='active' only; historical = relation_status='historical' only; all = both (default, preserves API contract)","default":"all","title":"Include"},"description":"current = relation_status='active' only; historical = relation_status='historical' only; all = both (default, preserves API contract)"},{"name":"depth","in":"query","required":false,"schema":{"type":"integer","maximum":1,"minimum":1,"description":"MVP supports depth=1 only (TZ §8.6)","default":1,"title":"Depth"},"description":"MVP supports depth=1 only (TZ §8.6)"},{"name":"risk_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Risk Only"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sanctions/check":{"post":{"tags":["sanctions"],"summary":"Synchronous sanctions check","operationId":"check_api_v1_sanctions_check_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SanctionsCheckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SanctionsCheckResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sanctions/lists":{"get":{"tags":["sanctions"],"summary":"Connected sanctions lists","operationId":"list_lists_api_v1_sanctions_lists_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sanctions/checks":{"get":{"tags":["sanctions"],"summary":"Recent sanctions checks (history)","operationId":"checks_history_api_v1_sanctions_checks_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecksHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sanctions/checks/{check_id}":{"get":{"tags":["sanctions"],"summary":"Sanctions check details","operationId":"get_check_api_v1_sanctions_checks__check_id__get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","title":"Check Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SanctionsCheckResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sanctions/matches/{match_id}/verify":{"post":{"tags":["sanctions"],"summary":"Confirm or reject a possible_match","operationId":"verify_match_api_v1_sanctions_matches__match_id__verify_post","parameters":[{"name":"match_id","in":"path","required":true,"schema":{"type":"string","title":"Match Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SanctionsMatchOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/watchlist/items":{"post":{"tags":["watchlist"],"summary":"Add counterparty to watchlist","operationId":"create_item_api_v1_watchlist_items_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistItemCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Item Api V1 Watchlist Items Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["watchlist"],"summary":"List watched items","operationId":"list_items_api_v1_watchlist_items_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Items Api V1 Watchlist Items Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/watchlist/items/{item_id}":{"delete":{"tags":["watchlist"],"summary":"Remove from watchlist","operationId":"delete_item_api_v1_watchlist_items__item_id__delete","parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/monitoring/events":{"get":{"tags":["monitoring"],"summary":"Monitoring events feed (outbox; webhooks not yet delivered)","operationId":"list_events_api_v1_monitoring_events_get","parameters":[{"name":"event_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"filter by event_type","title":"Event Type"},"description":"filter by event_type"},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"}},{"name":"identifier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identifier"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"ISO datetime; detected_at >= since","title":"Since"},"description":"ISO datetime; detected_at >= since"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Events Api V1 Monitoring Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/monitoring/events/{event_id}":{"get":{"tags":["monitoring"],"summary":"Monitoring event details","operationId":"get_event_api_v1_monitoring_events__event_id__get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Event Api V1 Monitoring Events  Event Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/monitoring/events/{event_id}/ack":{"post":{"tags":["monitoring"],"summary":"Acknowledge event","operationId":"ack_event_api_v1_monitoring_events__event_id__ack_post","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Event Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ack Event Api V1 Monitoring Events  Event Id  Ack Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/endpoints":{"post":{"tags":["webhooks"],"summary":"Register webhook endpoint","operationId":"create_endpoint_api_v1_webhooks_endpoints_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Endpoint Api V1 Webhooks Endpoints Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["webhooks"],"summary":"List endpoints","operationId":"list_endpoints_api_v1_webhooks_endpoints_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Endpoints Api V1 Webhooks Endpoints Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/deliveries":{"get":{"tags":["webhooks"],"summary":"Delivery journal","operationId":"list_deliveries_api_v1_webhooks_deliveries_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Deliveries Api V1 Webhooks Deliveries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/deliveries/{delivery_id}/retry":{"post":{"tags":["webhooks"],"summary":"Manual delivery retry","operationId":"retry_delivery_api_v1_webhooks_deliveries__delivery_id__retry_post","parameters":[{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","title":"Delivery Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Retry Delivery Api V1 Webhooks Deliveries  Delivery Id  Retry Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/healthz":{"get":{"tags":["health"],"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Healthz Healthz Get"}}}}}}},"/readyz":{"get":{"tags":["health"],"summary":"Readyz","operationId":"readyz_readyz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Readyz Readyz Get"}}}}}}}},"components":{"schemas":{"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","minLength":10,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"ChecksHistoryItem":{"properties":{"check_id":{"type":"string","title":"Check Id"},"name":{"type":"string","title":"Name"},"entity_type":{"type":"string","title":"Entity Type"},"identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identifier"},"result":{"type":"string","title":"Result"},"risk_level":{"type":"string","title":"Risk Level"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"matches_count":{"type":"integer","title":"Matches Count"}},"type":"object","required":["check_id","name","entity_type","identifier","result","risk_level","created_at","matches_count"],"title":"ChecksHistoryItem"},"ChecksHistoryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ChecksHistoryItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ChecksHistoryResponse"},"CompanyCard":{"properties":{"country":{"type":"string","title":"Country"},"identifier":{"type":"string","title":"Identifier"},"identifier_type":{"type":"string","title":"Identifier Type"},"identifier_mask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identifier Mask"},"entity_type":{"type":"string","title":"Entity Type"},"name":{"type":"string","title":"Name"},"short_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Name"},"status":{"type":"string","title":"Status"},"legal_form":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Form"},"registration_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Registration Date"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"address_meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Address Meta"},"source":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Source"},"source_actual_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Source Actual On"},"available_modules":{"items":{"type":"string"},"type":"array","title":"Available Modules"},"extra":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra"}},"type":"object","required":["country","identifier","identifier_type","identifier_mask","entity_type","name","short_name","status","legal_form","registration_date","address","source","source_actual_on","available_modules","extra"],"title":"CompanyCard"},"CompanyHit":{"properties":{"country":{"type":"string","title":"Country"},"identifier":{"type":"string","title":"Identifier"},"identifier_type":{"type":"string","title":"Identifier Type"},"identifier_mask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identifier Mask"},"entity_type":{"type":"string","title":"Entity Type"},"name":{"type":"string","title":"Name"},"short_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Name"},"status":{"type":"string","title":"Status"},"matched_by":{"items":{"type":"string"},"type":"array","title":"Matched By"},"source_actual_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Source Actual On"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"matched_via":{"anyOf":[{"$ref":"#/components/schemas/MatchedVia"},{"type":"null"}]}},"type":"object","required":["country","identifier","identifier_type","identifier_mask","entity_type","name","short_name","status","matched_by","source_actual_on","score"],"title":"CompanyHit"},"CompanySearchResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CompanyHit"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"CompanySearchResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ListsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SanctionsListOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ListsResponse"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"MatchedVia":{"properties":{"relation_type":{"type":"string","title":"Relation Type"},"person_name":{"type":"string","title":"Person Name"}},"type":"object","required":["relation_type","person_name"],"title":"MatchedVia","description":"Why this company appeared in a non-direct name search (e.g. user searched\n'бурдук' and a company surfaced because its director is 'Бурдук Денис')."},"MeResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"role":{"type":"string","title":"Role"},"is_active":{"type":"boolean","title":"Is Active"},"must_change_password":{"type":"boolean","title":"Must Change Password"}},"type":"object","required":["id","email","full_name","role","is_active","must_change_password"],"title":"MeResponse"},"OAuthProviders":{"properties":{"microsoft":{"type":"boolean","title":"Microsoft"}},"type":"object","required":["microsoft"],"title":"OAuthProviders"},"Pagination":{"properties":{"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"},"has_more":{"type":"boolean","title":"Has More","default":false}},"type":"object","required":["limit","offset"],"title":"Pagination"},"RefreshRequest":{"properties":{"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}},"type":"object","title":"RefreshRequest"},"RelationItem":{"properties":{"relation_type":{"type":"string","title":"Relation Type"},"subject_type":{"type":"string","title":"Subject Type"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identifier"},"identifier_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identifier Type"},"identifier_mask":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identifier Mask"},"status":{"type":"string","title":"Status"},"risk_level":{"type":"string","title":"Risk Level"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"actual_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Actual On"},"evidence":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Evidence"}},"type":"object","required":["relation_type","subject_type","name","identifier","identifier_type","identifier_mask","status","risk_level","source","actual_on","evidence"],"title":"RelationItem"},"RelationsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RelationItem"},"type":"array","title":"Items"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["items","pagination"],"title":"RelationsResponse"},"SanctionsCheckRequest":{"properties":{"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","default":"UA"},"entity_type":{"type":"string","enum":["company","person","fop","vessel","aircraft","unknown"],"title":"Entity Type","default":"unknown"},"identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identifier"},"identifier_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identifier Type"},"name":{"type":"string","maxLength":500,"minLength":1,"title":"Name"},"include_related_parties":{"type":"boolean","title":"Include Related Parties","default":false},"related_party_depth":{"type":"integer","maximum":1.0,"minimum":1.0,"title":"Related Party Depth","default":1},"match_mode":{"type":"string","enum":["strict","balanced","fuzzy"],"title":"Match Mode","default":"balanced"},"external_refs":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"External Refs"}},"type":"object","required":["name"],"title":"SanctionsCheckRequest"},"SanctionsCheckResult":{"properties":{"check_id":{"type":"string","title":"Check Id"},"status":{"type":"string","title":"Status"},"result":{"type":"string","title":"Result"},"risk_level":{"type":"string","title":"Risk Level"},"checked_at":{"type":"string","format":"date-time","title":"Checked At"},"actual_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Actual On"},"matches":{"items":{"$ref":"#/components/schemas/SanctionsMatchOut"},"type":"array","title":"Matches"},"sources":{"items":{"$ref":"#/components/schemas/SourceMeta"},"type":"array","title":"Sources"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"}},"type":"object","required":["check_id","status","result","risk_level","checked_at","actual_on","matches","sources","duration_ms"],"title":"SanctionsCheckResult"},"SanctionsListOut":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"actual_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Actual On"},"subject_count":{"type":"integer","title":"Subject Count"},"status":{"type":"string","title":"Status"}},"type":"object","required":["code","name","country","actual_on","subject_count","status"],"title":"SanctionsListOut"},"SanctionsMatchOut":{"properties":{"id":{"type":"string","title":"Id"},"subject_id":{"type":"string","title":"Subject Id"},"list_code":{"type":"string","title":"List Code"},"subject_name":{"type":"string","title":"Subject Name"},"subject_type":{"type":"string","title":"Subject Type"},"match_score":{"type":"number","title":"Match Score"},"match_fields":{"items":{"type":"string"},"type":"array","title":"Match Fields"},"result":{"type":"string","title":"Result"},"risk_level":{"type":"string","title":"Risk Level"},"via_related_party":{"type":"boolean","title":"Via Related Party"},"related_party_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Related Party Name"},"related_party_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Related Party Role"},"review_status":{"type":"string","title":"Review Status"}},"type":"object","required":["id","subject_id","list_code","subject_name","subject_type","match_score","match_fields","result","risk_level","via_related_party","related_party_name","related_party_role","review_status"],"title":"SanctionsMatchOut"},"SourceMeta":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"actual_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Actual On"}},"type":"object","required":["code","name","actual_on"],"title":"SourceMeta"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"must_change_password":{"type":"boolean","title":"Must Change Password","default":false}},"type":"object","required":["access_token","refresh_token"],"title":"TokenResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerifyRequest":{"properties":{"decision":{"type":"string","enum":["confirmed_match","false_positive","needs_more_info"],"title":"Decision"},"comment":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Comment"}},"type":"object","required":["decision"],"title":"VerifyRequest"},"WatchlistItemCreate":{"properties":{"country":{"type":"string","title":"Country"},"identifier":{"type":"string","title":"Identifier"},"identifier_type":{"type":"string","title":"Identifier Type"},"name":{"type":"string","title":"Name"},"group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group"},"monitoring_modules":{"items":{"type":"string"},"type":"array","title":"Monitoring Modules","default":[]},"external_refs":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"External Refs"}},"type":"object","required":["country","identifier","identifier_type","name"],"title":"WatchlistItemCreate"},"WebhookEndpointCreate":{"properties":{"name":{"type":"string","title":"Name"},"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["name","url","event_types"],"title":"WebhookEndpointCreate"}}}}