{"openapi":"3.1.0","info":{"title":"LEISearchPro API","description":"LEI lookup, search (by name, BIC or ISIN), corporate group structure, sanctions screening (OFAC, EU, UN, UK) and bulk LEI validation, built on GLEIF data. Authenticate with the `X-Api-Key` header. A free key (no card) is at https://leisearch.pro/signup; plans and limits at https://leisearch.pro/api.html#pricing.","version":"1.0.0","contact":{"name":"LEISearchPro","url":"https://leisearch.pro"},"termsOfService":"https://leisearch.pro/terms.html"},"paths":{"/me":{"get":{"tags":["Auth"],"summary":"Get authenticated caller's account details","description":"Validates the caller's API key and returns account metadata.\n\nIntended for use by the dashboard login page to:\n- Confirm the key is valid and active\n- Determine which UI experience to load based on `tier`\n- Surface tier limits (portfolio size, seats, rate limits) to the user\n\n**No extra DB query is made** -- the API key was already validated and cached\nby the authentication dependency, so this endpoint adds negligible latency.\n\n**Authentication:** `X-Api-Key` header required.","operationId":"get_me_me_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":{"$ref":"#/components/schemas/MeResponse"}}}},"401":{"description":"Missing or invalid API key"},"429":{"description":"Rate limit exceeded"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/register":{"post":{"tags":["Auth","Auth"],"summary":"Register for a free API key","description":"Self-serve free-tier registration. Provide your email and name; receive an API key instantly.\n\n**Rate limits (free tier):**\n- 1 request / minute\n- Batch size: up to 10 entities\n\nThe raw API key is returned **once only**. Store it immediately.\n\nNo authentication required for this endpoint.","operationId":"register_free_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterResponse"}}}},"409":{"description":"An API key already exists for this email address."},"422":{"description":"Validation error in request body."}}}},"/team/invite":{"post":{"tags":["Team"],"summary":"Invite a team member by email","description":"Send an email invitation to a new team member.\n\nThe invitee will receive a link to accept the invitation and generate their\nown API key, which will be linked to your account and count against your seat quota.\n\n**Seat limits (hard block):**\n- Professional: 2 total (owner + 1 member)\n- Team: 10 total (owner + 9 members)\n- Enterprise: unlimited\n\n**Authentication:** `X-Api-Key` header required. Only the account owner (the key\ncreated at checkout) can invite members — member keys cannot invite others.","operationId":"invite_member_team_invite_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":{"$ref":"#/components/schemas/InviteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/team/members":{"get":{"tags":["Team"],"summary":"List active team members","description":"Returns all active member keys linked to this account.\n\n**Authentication:** `X-Api-Key` header required (owner key).","operationId":"list_members_team_members_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":{"$ref":"#/components/schemas/MembersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/team/members/{key_id}":{"patch":{"tags":["Team"],"summary":"Change a team member's role","description":"Updates a member's role in place — previously this required revoking and\nre-inviting them, which meant a new invite email, a new API key, and losing\nthe old key's audit trail continuity (docs/org-roles.md, \"Deliberately out\nof scope (v1)\"). This closes that gap.\n\nTakes effect on the member's next request past their current cache entry\n(role is read from the cached auth dict, 5-minute Valkey TTL — same\npropagation delay as a deactivation).\n\n**Authentication:** `X-Api-Key` header required (owner key only). `role`\nmust be one of `coo`, `analyst`, `support` — `owner` is not assignable\n(there is exactly one owner per org, the key created at checkout).","operationId":"update_member_role_team_members__key_id__patch","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"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":{"$ref":"#/components/schemas/RoleUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberKey"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Team"],"summary":"Revoke a team member's access","description":"Deactivates the specified member API key. The member loses API access from\ntheir next request (the cached auth entry is cleared).\n\n**Authentication:** `X-Api-Key` header required (owner key only).","operationId":"revoke_member_team_members__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key 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":{"$ref":"#/components/schemas/RevokeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/team/accept":{"post":{"tags":["Team"],"summary":"Accept a team invitation","description":"Accept a pending team invitation using the token from your invite email.\nThe invite e-mail links to https://leisearch.pro/team-accept.html, which calls\nthis endpoint when you click **Accept**.\n\nThis endpoint is **public** — no API key required. The invite token\nauthenticates the request. Each token is single-use and expires after 48 hours.\n\nOn success, a new API key is returned — **store it immediately**, it will not\nbe shown again.","operationId":"accept_invite_team_accept_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account/export":{"get":{"tags":["Account"],"summary":"Download a copy of your data","description":"Returns everything LEISearch holds about your account as one JSON document\n(UK GDPR Articles 15 and 20).\n\n**Owner key:** the whole organisation -- every seat. **Member key:** your own\nseat only. Secrets (key hashes, OAuth tokens, webhook secrets) are never\nincluded; the response's `not_included` list says what else is left out and\nwhy. The request log is capped at the newest 100,000 rows (`truncated`).\n\n**Authentication:** `X-Api-Key` header required. Limited to 2 requests a minute.","operationId":"export_account_account_export_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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/account":{"patch":{"tags":["Account"],"summary":"Correct the name or change the language of your account","description":"Changes the name shown on your own seat (UK GDPR Article 16) and/or the seat's\nlanguage (`en`, `es`, `de`, `fr`, `zh`, `pt`), which sets the language of its e-mails,\nportfolio digests and Stripe pages. Send either field or both. Owners and members\ncan each change their own. To change the e-mail address, write to support from\nthe current address -- it is how we confirm the request comes from you.\n\n**Authentication:** `X-Api-Key` header required.","operationId":"update_account_account_patch","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":{"$ref":"#/components/schemas/UpdateAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Account"],"summary":"Delete your account and erase your personal data","description":"Permanently deletes your account. This cannot be undone.\n\n**Owner key:** erases the entire organisation -- every member seat's data\nand your own, and cancels any live Stripe subscription.\n\n**Member key:** erases only your own data. The organisation, its billing,\nand other members are unaffected.\n\nSome records are retained for a limited time where we're legally required\nto (compliance-screening history, billing/tax records, referral\ncommission records, audit-log entries) -- see the response's\n`retained_for_legal_reasons` field and our Privacy Policy.\n\n**Authentication:** `X-Api-Key` header required. Body must include\n`confirm_email` matching the email on your own account, or the request is\nrejected with 400.","operationId":"delete_account_account_delete","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":{"$ref":"#/components/schemas/DeleteAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountErasureResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connectors":{"get":{"tags":["Connectors"],"summary":"List connector status","description":"Returns the connection status of all supported connectors for the caller. Team/Enterprise tier only.","operationId":"list_connectors_connectors_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":{"$ref":"#/components/schemas/ConnectorListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connectors/{connector_type}/auth":{"get":{"tags":["Connectors"],"summary":"Initiate OAuth authorization flow","description":"Returns an OAuth authorization URL. Redirect the user's browser to authUrl to begin the connection flow.","operationId":"initiate_oauth_connectors__connector_type__auth_get","parameters":[{"name":"connector_type","in":"path","required":true,"schema":{"type":"string","title":"Connector Type"}},{"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/AuthUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connectors/{connector_type}/confirm":{"post":{"tags":["Connectors"],"summary":"Finish connecting after OAuth consent","description":"Called by the dashboard with the one-time code from the post-consent redirect. The connection is stored only if this API key is the one that started the flow.","operationId":"confirm_connector_connectors__connector_type__confirm_post","parameters":[{"name":"connector_type","in":"path","required":true,"schema":{"type":"string","title":"Connector Type"}},{"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":{"$ref":"#/components/schemas/ConfirmRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connectors/{connector_type}":{"delete":{"tags":["Connectors"],"summary":"Disconnect a connector","description":"Revokes stored tokens and marks the connector as inactive. The connection can be re-established by going through the OAuth flow again.","operationId":"disconnect_connector_connectors__connector_type__delete","parameters":[{"name":"connector_type","in":"path","required":true,"schema":{"type":"string","title":"Connector Type"}},{"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connectors/{connector_type}/sync":{"post":{"tags":["Connectors"],"summary":"Trigger manual portfolio sync","description":"Triggers an immediate sync from the connected data source. Returns instantly; sync runs asynchronously.","operationId":"trigger_sync_connectors__connector_type__sync_post","parameters":[{"name":"connector_type","in":"path","required":true,"schema":{"type":"string","title":"Connector Type"}},{"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/SyncResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connectors/google-sheets/configure":{"post":{"tags":["Connectors"],"summary":"Configure Google Sheets connector","description":"Save the spreadsheet ID and cell range for the Google Sheets connector.\n\nCall this after completing the OAuth flow. The spreadsheet ID is the long\nalphanumeric string in the Google Sheets URL:\n`https://docs.google.com/spreadsheets/d/**{spreadsheet_id}**/edit`\n\nThe `range` uses A1 notation — e.g. `Sheet1!A:A` reads the entire first\ncolumn of Sheet1. All cells matching the 20-character alphanumeric LEI format\nwill be extracted; headers and blank cells are ignored automatically.\n\nAfter configuring, trigger a sync via `POST /connectors/google-sheets/sync`.\n\n**Authentication:** `X-Api-Key` header required (Team/Enterprise tier).","operationId":"configure_google_sheets_connectors_google_sheets_configure_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":{"$ref":"#/components/schemas/GoogleSheetsConfigRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleSheetsConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connectors/onedrive/configure":{"post":{"tags":["Connectors"],"summary":"Configure OneDrive connector","description":"Save the OneDrive file location and worksheet configuration.\n\nCall this after completing the OAuth flow. You can identify the file by:\n- **file_path** — the path within your OneDrive (e.g. `Documents/entities.xlsx`)\n- **item_id** — the OneDrive item ID from the file's share URL (preferred for shared drives)\n\nThe `sheet_name` and `range` identify which worksheet and column contain LEI codes.\nAll cells matching the 20-character alphanumeric LEI format are extracted automatically.\n\nAfter configuring, trigger a sync via `POST /connectors/onedrive/sync`.\n\n**Authentication:** `X-Api-Key` header required (Team/Enterprise tier).","operationId":"configure_onedrive_connectors_onedrive_configure_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":{"$ref":"#/components/schemas/OneDriveConfigRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OneDriveConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connectors/salesforce/configure":{"post":{"tags":["Connectors"],"summary":"Configure Salesforce connector","description":"Save the SOQL query and field name for the Salesforce connector.\n\nCall this after completing the OAuth flow. Provide a SOQL query that selects\nthe field containing LEI codes. All values matching the 20-character\nalphanumeric LEI format are extracted automatically.\n\n**Example SOQL:**\n```\nSELECT LEI__c FROM Account WHERE LEI__c != NULL LIMIT 2000\n```\n\nThe `lei_field` should match the API name of the field in the SELECT clause.\nAfter configuring, trigger a sync via `POST /connectors/salesforce/sync`.\n\n**Authentication:** `X-Api-Key` header required (Team/Enterprise tier).","operationId":"configure_salesforce_connectors_salesforce_configure_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":{"$ref":"#/components/schemas/SalesforceConfigRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesforceConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connectors/webhook-push/register":{"post":{"tags":["Connectors"],"summary":"Register inbound webhook push connector","description":"Configure your source system (CRM, TMS, internal tool) to POST entity updates to the\nreturned webhookUrl. Each payload must be signed with the returned signingSecret using\nHMAC-SHA256. LEISearch verifies the signature before processing.\n\nPayload format:\n```json\n{\"leis\": [\"LEI1\", \"LEI2\", ...]}\n```","operationId":"register_webhook_push_connectors_webhook_push_register_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":{"$ref":"#/components/schemas/WebhookPushRegisterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPushRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/audit-pdf/{lei}":{"post":{"tags":["Audit PDF"],"summary":"Generate a single-entity audit PDF","description":"Generate a single-entity audit PDF for the given LEI.\n\nThe report is professional-grade and suitable for regulatory submission.\nIncludes full ownership structure, sanctions exposure, jurisdiction risk,\nand a certification block with timestamp and API key prefix.","operationId":"post_audit_pdf_audit_pdf__lei__post","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"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":{"$ref":"#/components/schemas/AuditPdfRequest"}}}},"responses":{"200":{"description":"PDF binary or JSON with download URL","content":{"application/json":{"schema":{}}}},"400":{"description":"Invalid LEI format"},"403":{"description":"Tier does not include audit PDF export"},"404":{"description":"LEI not found"},"401":{"description":"Missing or invalid API key"},"429":{"description":"Rate limit exceeded"},"500":{"description":"PDF generation failed"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portfolio/watchlist":{"post":{"tags":["Portfolio"],"summary":"Add LEIs to the portfolio watchlist","description":"Add one or more LEIs to the caller's portfolio watchlist.\n\nLEIs are upserted: if a LEI was previously soft-deleted it is re-activated.\nTier limits apply: Pro max 100 entities; Professional max 2,000;\nTeam/Enterprise unlimited. Free does not have portfolio access.","operationId":"add_to_watchlist_portfolio_watchlist_post","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":{"$ref":"#/components/schemas/WatchlistAddResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistAddRequest"}}}}},"get":{"tags":["Portfolio"],"summary":"List active portfolio watchlist entries","description":"Return all active LEIs in the caller's portfolio watchlist, newest first.","operationId":"get_watchlist_portfolio_watchlist_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":{"$ref":"#/components/schemas/WatchlistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Portfolio"],"summary":"Clear the entire watchlist","description":"Soft-delete all active entries in the caller's watchlist.","operationId":"clear_watchlist_portfolio_watchlist_delete","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portfolio/watchlist/{lei}":{"patch":{"tags":["Portfolio"],"summary":"Set the reporting roles a watchlist LEI is used in","description":"Tag an LEI with the reporting roles it is used in (for example\nMIFIR:executing_entity for your own LEI, EMIR:counterparty_2 for a\nclient's). The renewal radar and renewal reminders then say whether a\nlapse would stop a report.","operationId":"update_watchlist_entry_portfolio_watchlist__lei__patch","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"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":{"$ref":"#/components/schemas/FilingRolesUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Portfolio"],"summary":"Remove a single LEI from the watchlist","description":"Soft-delete a LEI from the watchlist. Historical snapshots are retained.","operationId":"remove_from_watchlist_portfolio_watchlist__lei__delete","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portfolio/lei-status":{"get":{"tags":["Portfolio"],"summary":"Check GLEIF registration status of all watchlist LEIs","description":"Batch-checks every LEI in your portfolio watchlist against the GLEIF database\nand returns current registration and entity status.\n\n**Why this matters:**\n- A **LAPSED** LEI means the entity has not renewed its annual LEI registration.\n  Under **MiFID II** and **EMIR**, entities with lapsed LEIs cannot legally report\n  transactions — a lapsed counterparty LEI is a settlement and reporting risk.\n- A **RETIRED** or **ANNULLED** LEI indicates the entity may have been dissolved,\n  merged, or was found to be erroneously registered.\n- An **INACTIVE** entity status means the legal entity is no longer operational.\n\nUse `attention_required` as your triage count — any value > 0 warrants review.\n\n**Authentication:** `X-Api-Key` header required (Pro tier or above).","operationId":"get_portfolio_lei_status_portfolio_lei_status_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":{"$ref":"#/components/schemas/PortfolioStatusResponse"}}}},"403":{"description":"Portfolio requires Pro tier or above"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portfolio/renewal-radar":{"get":{"tags":["Portfolio"],"summary":"30/60/90-day LEI renewal countdown for portfolio","description":"Returns every watchlist LEI bucketed by days until its GLEIF LEI registration renewal date.\n\n**Why this matters:**\nLEIs are renewed every year. Trade repositories and regulators reject new\nreports in which the REPORTING firm's own LEI (MiFIR executing entity, EMIR\ncounterparty 1, SFTR reporting counterparty) has lapsed; a lapsed LEI is\ngenerally still accepted for the other side of a trade. Tag entries with the\nroles they're used in (PATCH /portfolio/watchlist/{lei}) and `lapseBlocksFiling`\nlists the roles a lapse would stop. Use this endpoint to get ahead of lapses.\n\n**Buckets:**\n- `overdue` — renewal date already passed (LEI may already be LAPSED)\n- `within_30` — renews within 30 days (urgent)\n- `within_60` — renews within 60 days (watch)\n- `within_90` — renews within 90 days (monitor)\n- `beyond_90` — renews in >90 days (healthy)\n- `no_date` — GLEIF record has no next renewal date (common for some LOU types)\n\n**Authentication:** `X-Api-Key` header required (Pro tier or above).","operationId":"get_renewal_radar_portfolio_renewal_radar_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":{"$ref":"#/components/schemas/RenewalRadarResponse"}}}},"403":{"description":"Portfolio requires Pro tier or above"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portfolio/group-exposure":{"get":{"tags":["Portfolio"],"summary":"Portfolio group exposure consolidation","description":"Aggregates every LEI in your watchlist by ultimate parent (IS_ULTIMATELY_CONSOLIDATED_BY).\n\n    Entities with no reported ultimate parent are treated as independent\n    (each forms its own one-member group).\n\n    Returns concentration alerts when two or more portfolio LEIs share a common\n    ultimate parent — indicating concentrated credit or sanctions exposure.\n\n    **Requires Professional tier or above.**","operationId":"get_group_exposure_portfolio_group_exposure_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":{"$ref":"#/components/schemas/GroupExposureResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portfolio/jurisdiction-heatmap":{"get":{"tags":["Portfolio"],"summary":"Portfolio jurisdiction concentration heatmap","description":"Returns a country-level breakdown of your portfolio LEIs by jurisdiction.\n\n    ISO 3166-2 subdivision codes (e.g. `US-DE`) are collapsed to the 2-letter\n    country code (`US`). High-risk jurisdictions (FATF blacklist: RU, IR, KP,\n    etc.) are flagged regardless of count.\n\n    **Requires Professional tier or above.**","operationId":"get_jurisdiction_heatmap_portfolio_jurisdiction_heatmap_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":{"$ref":"#/components/schemas/JurisdictionHeatmapResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portfolio/export/gleif":{"get":{"tags":["Portfolio"],"summary":"Export portfolio as GLEIF-standard CSV","description":"Downloads the portfolio watchlist in the 13-column GLEIF export format (LEI CODE, LEGAL ENTITY NAME, ENTITY STATUS, LEI STATUS, LEGAL FORM, COUNTRY, CITY, COMPANY NO., REGISTRY, BIC CODE, ISIN CODE, REG. DATE, UPDATED). Requires Pro tier or above -- a basic export of your own watchlist, not a scale/analytics feature, so it follows the base portfolio gate (_portfolio_limit), not _portfolio_analytics_allowed.","operationId":"export_gleif_csv_portfolio_export_gleif_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"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitoring/{lei}":{"post":{"tags":["Portfolio Monitoring"],"summary":"Opt an entity into (or update) ongoing compliance monitoring","description":"Partial update: only the toggle(s) present in the request body are\nchanged. First call for a LEI defaults any omitted toggle to FALSE\n(matching the column defaults) -- there is no monitoring until at\nleast one toggle is explicitly set TRUE.\n\nRe-screening itself is performed by the scheduled batch job\n(etl/compliance_screening_job.py), not by this endpoint -- this only\nwrites configuration, it never calls a vendor or spends budget.","operationId":"set_monitoring_monitoring__lei__post","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"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":{"$ref":"#/components/schemas/MonitoringSetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitoringConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Portfolio Monitoring"],"summary":"Remove an entity from ongoing compliance monitoring entirely","description":"Hard-deletes the config row (portfolio_monitoring_config has no\nsoft-delete column, unlike user_portfolios' removed_at -- migration\n038 is FROZEN per CLAUDE.md's migration-hygiene rule, so adding one\nnow would mean a new migration file, not editing this one; a hard\ndelete is the correct behavior today, not a shortcut). To disable\njust one capability group while keeping the other active, use\nPOST /monitoring/{lei} with that one toggle set to false instead.","operationId":"delete_monitoring_monitoring__lei__delete","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitoring":{"get":{"tags":["Portfolio Monitoring"],"summary":"List all entities enrolled in ongoing compliance monitoring","description":"Every entity with at least one monitoring toggle set (ON or OFF is\nboth returned here -- this lists everything ever configured, not just\nactively-monitored entities; a row with both toggles FALSE is\nfunctionally identical to no monitoring, but is still shown so a\ncustomer can see they previously turned it off, not confuse \"was\nnever configured\" with \"was configured then disabled\").","operationId":"list_monitoring_monitoring_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":{"$ref":"#/components/schemas/MonitoringListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitoring/{lei}/rescreen":{"post":{"tags":["Portfolio Monitoring"],"summary":"Recheck this entity now, bypassing the normal re-screen freshness window","description":"Screens the capabilities currently toggled on in this entity's monitoring\nconfig (or an explicit `capabilities` list, if the entity isn't under\nongoing monitoring but still needs a one-off check). Unlike the scheduled\nbatch job, this call ALWAYS screens fresh regardless of\n`next_eligible_screen_at` -- that freshness gate only applies to\netl/compliance_screening_job.py's own sweep (see that module's FRESHNESS\nGATING section), never to an explicit customer request here.\n\nConsumes the account's normal monthly_quota / daily_budget_usd -- this is\nNOT a separate, unmetered channel. A KYB / UBO check answered by a partner\n(where LEISearch has no in-house check) uses partner credits instead, and only\nwhen `partnerCredits` is at least what it uses: without it the check is quoted\n(`partnerCredits[capability].status = confirm`, with its credits and your\nbalance), not run. Estonia: the in-house check (shareholders) always runs; the\nbeneficial owners are added from a partner when `partnerCredits` covers them\n(`scope = beneficial_owners`), and the check is then paid in partner credits\ninstead of the plan's quota.","operationId":"rescreen_now_monitoring__lei__rescreen_post","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"name":"partnerCredits","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":0,"description":"The most partner credits you agree this check may use (shown by a previous call's partnerCredits quote). 0 = quote only.","default":0,"title":"Partnercredits"},"description":"The most partner credits you agree this check may use (shown by a previous call's partnerCredits quote). 0 = quote only."},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/ScreeningCapability"}},{"type":"null"}],"title":"Capabilities"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RescreenResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitoring/{lei}/history":{"get":{"tags":["Portfolio Monitoring"],"summary":"Full screening audit trail for this entity","description":"Your organisation's own screens of this entity, newest first, with your latest decision on each match.","operationId":"screening_history_monitoring__lei__history_get","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"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":{"type":"array","items":{"$ref":"#/components/schemas/ScreeningHistoryEntry"},"title":"Response Screening History Monitoring  Lei  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitoring/{lei}/last-screened":{"get":{"tags":["Portfolio Monitoring"],"summary":"Quick per-(provider, capability) summary of when this entity was last checked","description":"Your organisation's most recent screen per provider and capability.","operationId":"last_screened_monitoring__lei__last_screened_get","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"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":{"type":"array","items":{"$ref":"#/components/schemas/LastScreenedEntry"},"title":"Response Last Screened Monitoring  Lei  Last Screened Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitoring/{lei}/screenings":{"get":{"tags":["Portfolio Monitoring"],"summary":"Every screening of this entity, clear ones included","description":"Your organisation's screens of this entity, newest first: one entry per vendor check, with what it found (an empty `matches` list means nothing was found). `/history` lists the matches themselves with your decisions on them.","operationId":"screening_runs_monitoring__lei__screenings_get","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"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":{"type":"array","items":{"$ref":"#/components/schemas/ScreeningRun"},"title":"Response Screening Runs Monitoring  Lei  Screenings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitoring/{lei}/ownership":{"get":{"tags":["Portfolio Monitoring"],"summary":"Owners seen at your last KYB / UBO check of this entity","description":"UK and Latvian entities: GLEIF parents and reporting exceptions plus the register's owners -- Companies House persons with significant control (UK) or the Register of Enterprises' beneficial owners (Latvia) -- each checked against LEISearch's sanctions lists, as your organisation's last check saw them. Changes between checks are listed by /screenings.","operationId":"ownership_view_monitoring__lei__ownership_get","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"name":"at","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The time of an earlier check (from /screenings): returns the ownership structure that check saw, without a new check","title":"At"},"description":"The time of an earlier check (from /screenings): returns the ownership structure that check saw, without a new check"},{"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/OwnershipView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/monitoring/{lei}/ownership/discrepancy-note":{"get":{"tags":["Portfolio Monitoring"],"summary":"PDF note of where GLEIF and the register disagree about this entity's owners","description":"From your organisation's last KYB / UBO check of this entity, or the one in force at `at`: what GLEIF and the company register each say, why they can differ, what to do, and a review block to fill in. No new check, no charge. 404 when no check has been kept.","operationId":"ownership_discrepancy_note_monitoring__lei__ownership_discrepancy_note_get","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"name":"at","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The time of an earlier check (from /screenings)","title":"At"},"description":"The time of an earlier check (from /screenings)"},{"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":{}},"application/pdf":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dora/ict-register":{"post":{"tags":["DORA ICT Register"],"summary":"Add an ICT third-party provider to the DORA register","description":"Add a contracted ICT third-party service provider to your DORA Article 28 register.\n\nProvider names are deduplicated (case-insensitive). Re-posting an existing provider\nname updates the record in place rather than creating a duplicate.\n\n**DORA criticality levels:**\n- `CRITICAL` — provider supports a critical or important function; subject to EBA\n  concentration risk oversight and enhanced exit strategy obligations.\n- `IMPORTANT` — provider supports an important function within DORA's scope.\n- `STANDARD` — provider supports non-critical internal functions.\n\nIf a valid LEI is supplied, the record is enriched with live GLEIF registration\nand entity status on every `GET /dora/ict-register` call.","operationId":"add_ict_provider_dora_ict_register_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":{"$ref":"#/components/schemas/IctProviderRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IctProviderAddResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["DORA ICT Register"],"summary":"List the DORA ICT Third-Party Register","description":"Returns all active ICT third-party provider entries in your DORA Article 28 register,\noptionally filtered by criticality or service type.\n\nEach entry is enriched with live GLEIF registration status where an LEI is available.\nEntries where a provider's LEI has `LAPSED` or `INACTIVE` status are surfaced with\nthose fields set — useful for identifying providers that may have ceased operations\nor failed to maintain their LEI registration.\n\n**Regulatory note:** DORA Art.28(3) requires the register to be made available to the\ncompetent authority on request. Export via `GET /dora/ict-register/export` to produce\na submission-ready PDF.","operationId":"list_ict_register_dora_ict_register_get","parameters":[{"name":"criticality","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by CRITICAL | IMPORTANT | STANDARD","title":"Criticality"},"description":"Filter by CRITICAL | IMPORTANT | STANDARD"},{"name":"service_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by service type (e.g. CLOUD, SAAS)","title":"Service Type"},"description":"Filter by service type (e.g. CLOUD, SAAS)"},{"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/IctRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dora/ict-register/export":{"get":{"tags":["DORA ICT Register"],"summary":"Export the DORA ICT register as PDF or JSON","description":"Export the full DORA Article 28 register as a submission-ready PDF or raw JSON.\n\n**PDF format** (`?format=pdf`): A4 document with:\n- Cover page (entity name, prepared date, regulatory reference)\n- Summary table (total providers, criticality breakdown)\n- Full register table with GLEIF enrichment\n- DORA Art.28 compliance statement\n\n**JSON format** (`?format=json`, default): Machine-readable full register dump\nsuitable for integration with reporting tools.","operationId":"export_ict_register_dora_ict_register_export_get","parameters":[{"name":"format","in":"query","required":false,"schema":{"type":"string","description":"Export format: json | pdf","default":"json","title":"Format"},"description":"Export format: json | pdf"},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"PDF binary or JSON array","content":{"application/json":{"schema":{}}}},"403":{"description":"Professional tier or above required"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dora/ict-register/{entry_id}":{"get":{"tags":["DORA ICT Register"],"summary":"Get a single DORA register entry","operationId":"get_ict_provider_dora_ict_register__entry_id__get","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry 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":{"$ref":"#/components/schemas/IctProviderEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["DORA ICT Register"],"summary":"Update a DORA register entry","operationId":"update_ict_provider_dora_ict_register__entry_id__patch","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"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":{"$ref":"#/components/schemas/IctProviderPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IctProviderEntry"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["DORA ICT Register"],"summary":"Remove a provider from the DORA register","description":"Soft-deletes the entry. Historical records are retained for audit trail.","operationId":"delete_ict_provider_dora_ict_register__entry_id__delete","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/uk-mtp/taxonomy":{"get":{"tags":["UK Material Third-Party Register"],"summary":"Value lists of the official templates","operationId":"taxonomy_uk_mtp_taxonomy_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":{"type":"object","additionalProperties":true,"title":"Response Taxonomy Uk Mtp Taxonomy Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/uk-mtp/firm":{"get":{"tags":["UK Material Third-Party Register"],"summary":"Firm details for the submission header","operationId":"get_firm_uk_mtp_firm_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":{"$ref":"#/components/schemas/FirmProfile"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["UK Material Third-Party Register"],"summary":"Change the firm details (fields sent replace)","operationId":"patch_firm_uk_mtp_firm_patch","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":{"$ref":"#/components/schemas/FirmProfile"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FirmProfile"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/uk-mtp/register":{"post":{"tags":["UK Material Third-Party Register"],"summary":"Add a material third-party arrangement","operationId":"create_entry_uk_mtp_register_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":{"$ref":"#/components/schemas/EntryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Entry Uk Mtp Register Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["UK Material Third-Party Register"],"summary":"List the register, with LEI checks and missing fields","operationId":"list_entries_uk_mtp_register_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["PLANNED","ACTIVE","TERMINATED"],"type":"string"},{"type":"null"}],"title":"Status"}},{"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":{"type":"object","additionalProperties":true,"title":"Response List Entries Uk Mtp Register Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/uk-mtp/register/export":{"get":{"tags":["UK Material Third-Party Register"],"summary":"Export the annual register in the template's layout","operationId":"export_register_uk_mtp_register_export_get","parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["csv","json"],"type":"string","default":"csv","title":"Format"}},{"name":"as_at","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Reporting date; default 31 December last year","title":"As At"},"description":"Reporting date; default 31 December last year"},{"name":"submission_id","in":"query","required":false,"schema":{"type":"integer","maximum":999,"minimum":1,"description":"1.02: 1, or +1 for each resubmission","default":1,"title":"Submission Id"},"description":"1.02: 1, or +1 for each resubmission"},{"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/uk-mtp/register/import-dora":{"post":{"tags":["UK Material Third-Party Register"],"summary":"Copy providers from the DORA ICT register","description":"Copies the organisation's CRITICAL and IMPORTANT DORA providers in as\nACTIVE arrangements, with what the DORA register knows (name, LEI,\ncontract reference and dates, description). The UK-only fields stay\nempty and show as missing. A provider already recorded under the same\nreference is skipped, so running it twice is harmless. DORA entries\nwere validated more loosely: names are trimmed, and an LEI that fails\nthe check digits is left out (and reported) rather than copied.","operationId":"import_dora_uk_mtp_register_import_dora_post","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":{"type":"object","additionalProperties":true,"title":"Response Import Dora Uk Mtp Register Import Dora Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/uk-mtp/register/{entry_id}":{"get":{"tags":["UK Material Third-Party Register"],"summary":"One arrangement","operationId":"get_entry_uk_mtp_register__entry_id__get","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry 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":{"type":"object","additionalProperties":true,"title":"Response Get Entry Uk Mtp Register  Entry Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["UK Material Third-Party Register"],"summary":"Change an arrangement (a null clears a field)","operationId":"patch_entry_uk_mtp_register__entry_id__patch","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"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":{"$ref":"#/components/schemas/EntryPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Patch Entry Uk Mtp Register  Entry Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["UK Material Third-Party Register"],"summary":"Remove an entry made by mistake (use status TERMINATED for an ended arrangement)","operationId":"delete_entry_uk_mtp_register__entry_id__delete","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/uk-mtp/register/{entry_id}/notification":{"get":{"tags":["UK Material Third-Party Register"],"summary":"A notification in the template's layout","operationId":"export_notification_uk_mtp_register__entry_id__notification_get","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"name":"kind","in":"query","required":false,"schema":{"enum":["NEW","CHANGE","RENEWAL"],"type":"string","description":"1.03: new contract, contract change or renewal","default":"NEW","title":"Kind"},"description":"1.03: new contract, contract change or renewal"},{"name":"submission_id","in":"query","required":false,"schema":{"type":"integer","maximum":999,"minimum":1,"description":"1.02: 1, or +1 for each resubmission","default":1,"title":"Submission Id"},"description":"1.02: 1, or +1 for each resubmission"},{"name":"format","in":"query","required":false,"schema":{"enum":["csv","json"],"type":"string","default":"json","title":"Format"}},{"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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/uk-mtp/register/{entry_id}/notifications":{"get":{"tags":["UK Material Third-Party Register"],"summary":"Notifications recorded as sent","operationId":"list_notifications_uk_mtp_register__entry_id__notifications_get","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry 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":{"type":"object","additionalProperties":true,"title":"Response List Notifications Uk Mtp Register  Entry Id  Notifications Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["UK Material Third-Party Register"],"summary":"Record that a notification was sent to the FCA","operationId":"record_notification_uk_mtp_register__entry_id__notifications_post","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}},{"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":{"$ref":"#/components/schemas/NotificationRecord"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Record Notification Uk Mtp Register  Entry Id  Notifications Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payee-check":{"post":{"tags":["Payee LEI check"],"summary":"Check one payee against the GLEIF register","operationId":"check_payee_payee_check_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":{"$ref":"#/components/schemas/PayeeIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Check Payee Payee Check Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/payee-check/bulk":{"post":{"tags":["Payee LEI check"],"summary":"Check or enrich a list of payees","operationId":"check_bulk_payee_check_bulk_post","parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["json","csv"],"type":"string","default":"json","title":"Format"}},{"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":{"$ref":"#/components/schemas/api__routes__payee__BulkIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/filing-readiness/rules":{"get":{"tags":["Filing readiness"],"summary":"LEI statuses accepted for each reporting role","operationId":"rules_filing_readiness_rules_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":{"type":"object","additionalProperties":true,"title":"Response Rules Filing Readiness Rules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/filing-readiness/{lei}":{"get":{"tags":["Filing readiness"],"summary":"Can this LEI be used in a regulatory report?","operationId":"check_one_filing_readiness__lei__get","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"name":"role","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"REGIME:role, repeatable (see /filing-readiness/rules). Omit for every role.","title":"Role"},"description":"REGIME:role, repeatable (see /filing-readiness/rules). Omit for every role."},{"name":"as_of","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Report date (default today), within a year of today.","title":"As Of"},"description":"Report date (default today), within a year of today."},{"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":{"type":"object","additionalProperties":true,"title":"Response Check One Filing Readiness  Lei  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/filing-readiness/bulk":{"post":{"tags":["Filing readiness"],"summary":"Check a list of LEIs for filing readiness","operationId":"check_bulk_filing_readiness_bulk_post","parameters":[{"name":"format","in":"query","required":false,"schema":{"enum":["json","csv"],"type":"string","default":"json","title":"Format"}},{"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":{"$ref":"#/components/schemas/api__routes__filing_readiness__BulkIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cdd/onboard":{"post":{"tags":["CDD Onboarding"],"summary":"Full CDD onboarding workflow for a single LEI","description":"Runs the complete Customer Due Diligence sequence in a single API call:\n\n1. **LEI validation** — checks GLEIF registration and entity status\n2. **Sanctions screening** — direct LEI/name match + indirect ownership chain (configurable threshold)\n3. **Ownership trace** — up to 6 levels of GLEIF Level 2 relationships\n4. **Jurisdiction risk** — FATF high-risk / monitored / offshore classification\n5. **Overall risk verdict** — LOW / MEDIUM / HIGH / SANCTIONS_HIT with plain-English risk factors\n\n**Ownership threshold:**\n- `ownership_threshold=50` (default): OFAC 50% rule\n- `ownership_threshold=25`: EU AMLR Art.52 (effective July 2027)\n\n**Regulatory basis:** FATF Rec.10, EU AMLR Art.20, FCA SYSC 6.3, MiFID II Art.26, DORA Art.28","operationId":"cdd_onboard_cdd_onboard_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":{"$ref":"#/components/schemas/CddRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CddSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cdd/{lei}/reverify/{capability}":{"post":{"tags":["CDD Onboarding"],"summary":"Request an independent second-vendor opinion on an existing screen","description":"Calls the SECOND-priority configured provider for one capability directly,\nskipping the first provider the customer already has a result from --\nsee `ProviderOrchestrator.screen_with_reverification()` for the full\nwaterfall-bypass semantics.\n\nGated by `etl/providers/entitlement.py`'s `allow_independent_reverification`\nflag (Team/Enterprise only, as of the 14 Aug pricing decision -- Professional\nis never entitled to this) and a separate `reverification_monthly_cap`,\ntracked independently from the account's normal screening quota so this\ncan never silently borrow from or exhaust it.\n\nRequires a prior screen to already exist for this (LEI, capability) --\nrun onboarding (`POST /cdd/onboard`) or wait for a monitoring re-screen\nfirst. Returns 409 if none exists.","operationId":"cdd_reverify_cdd__lei__reverify__capability__post","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"name":"capability","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ScreeningCapability"}},{"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/ReverificationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coverage":{"get":{"tags":["Coverage"],"summary":"KYB / UBO coverage by country, and partner credits","operationId":"get_coverage_coverage_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":{"$ref":"#/components/schemas/CoverageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/coverage/public":{"get":{"tags":["Coverage"],"summary":"KYB / UBO coverage by country and what each plan includes (public, no key)","description":"For the pricing page's \"countries and costs\" view: the same rows as GET /coverage,\neach paid plan's allowance and the credit prices. Partner costs are in credits only,\nnever the partner's euro price (decision 7 Nov 2026).","operationId":"get_public_coverage_coverage_public_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCoverageResponse"}}}}}}},"/coverage/partner-checks":{"put":{"tags":["Coverage"],"summary":"Switch partner checks on or off","description":"Owner only. Partner checks use partner credits, never the plan's in-house KYB\nallowance. 409 while partner checks are coming soon.","operationId":"set_partner_checks_coverage_partner_checks_put","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":{"$ref":"#/components/schemas/PartnerSwitchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerSwitch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/casp":{"get":{"tags":["MiCA CASP Register"],"summary":"List authorised MiCA crypto-asset service providers","description":"Returns authorised CASPs from the ESMA interim MiCA register (updated weekly).\n\nResults can be filtered by home member state, passported country, or searched\nby name. Only active authorisations are returned by default.\n\n**Regulatory basis:** MiCA Art.63 authorisation requirement; ESMA Art.109-110 register.","operationId":"list_casps_casp_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name search (legal or commercial name)","title":"Q"},"description":"Name search (legal or commercial name)"},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by home member state (2-letter ISO, e.g. DE)","title":"Country"},"description":"Filter by home member state (2-letter ISO, e.g. DE)"},{"name":"passported","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by passported country (2-letter ISO)","title":"Passported"},"description":"Filter by passported country (2-letter ISO)"},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","description":"Return active authorisations only","default":true,"title":"Active Only"},"description":"Return active authorisations 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":"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/CaspListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/casp/check/{lei}":{"get":{"tags":["MiCA CASP Register"],"summary":"Check if a LEI belongs to an authorised MiCA CASP","description":"Fast boolean check: returns `isCasp: true` if the LEI is in the ESMA MiCA\nregister as an authorised crypto-asset service provider.\n\nUseful for enriching onboarding checks and CDD workflows without fetching\nthe full CASP record.","operationId":"check_casp_casp_check__lei__get","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"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/CaspCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/casp/{lei}":{"get":{"tags":["MiCA CASP Register"],"summary":"Get MiCA CASP details for a specific LEI","description":"Returns full authorisation details for a specific LEI from the ESMA MiCA register,\nincluding authorised services, passported EEA countries, and the authorising NCA.\n\nReturns 404 if the LEI is not a registered CASP.","operationId":"get_casp_casp__lei__get","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"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/CaspRecord"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lei/{lei}":{"get":{"tags":["LEI Lookup"],"summary":"Fetch a single LEI record","description":"Returns the full Level 1 entity data for a given 20-character LEI code.","operationId":"get_lei_lei__lei__get","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"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/LEIRecord"}}}},"404":{"description":"LEI not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lei/{lei}/history":{"get":{"tags":["LEI Lookup"],"summary":"Point-in-time and change history for a LEI","description":"Returns the full compliance-change history for a LEI from the `lei_snapshots` table. A snapshot is written each time a compliance-critical field changes in the GLEIF golden copy: `entity_status`, `legal_name`, `registration_status`, `managing_lou`.\n\n**Point-in-time query**: pass `?at=YYYY-MM-DD` to retrieve the record exactly as it appeared in the GLEIF golden copy on or before that date — the answer to *'what did we know about this entity at the time of onboarding?'*\n\n**Change timeline**: omit `at` to receive all snapshots (newest first), optionally bounded by `from_date` / `to_date`.","operationId":"get_lei_history_lei__lei__history_get","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"name":"at","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Return the single snapshot as-of this date (ISO 8601: YYYY-MM-DD). Returns the latest snapshot whose golden_copy_date ≤ at.","title":"At"},"description":"Return the single snapshot as-of this date (ISO 8601: YYYY-MM-DD). Returns the latest snapshot whose golden_copy_date ≤ at."},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Restrict timeline to snapshots on or after this date.","title":"From"},"description":"Restrict timeline to snapshots on or after this date."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Restrict timeline to snapshots on or before this date.","title":"To"},"description":"Restrict timeline to snapshots on or before this date."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Maximum number of snapshots to return (1–365, default 100).","default":100,"title":"Limit"},"description":"Maximum number of snapshots to return (1–365, default 100)."},{"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/LEIHistory"}}}},"404":{"description":"LEI not found or no snapshots","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Invalid LEI or date format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/search":{"get":{"tags":["Search"],"summary":"Search entities by name","description":"Fuzzy search across 2M+ legal entity names.\n    Handles typos, abbreviations, and partial matches via PostgreSQL pg_trgm.\n\n    **Phase 20 improvements:**\n    - Common abbreviations auto-expanded (\"JPM\" → \"JPMorgan\", \"DB\" → \"Deutsche Bank\")\n    - Legal suffixes stripped for broader cross-jurisdiction matching\n    - Short queries (≤ 5 chars) trigger prefix scan on normalised name index\n    - FTS fallback ensures zero-result queries still find lexeme matches\n\n    Examples:\n    - `?q=JPM` (expands to \"JPMorgan\" → JPMorgan Chase & Co.)\n    - `?q=Apple Inc&jurisdiction=US-CA`\n    - `?q=Deutsche Bank GmbH` (suffix stripped → matches AG, SE variants too)\n    - `?q=Deutche Bank` (typo-tolerant — matches Deutsche Bank AG)","operationId":"search_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":200,"description":"Entity name to search","title":"Q"},"description":"Entity name to search"},{"name":"jurisdiction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":10,"title":"Per Page"}},{"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"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/search/bic/{bic}":{"get":{"tags":["Search"],"summary":"Search by BIC / SWIFT code","description":"Returns all LEI records whose BIC array contains the given code. Accepts 8-char (APLEUS66) or 11-char (APLEUS66XXX) BIC format. Proxies the GLEIF API — results are authoritative and real-time.","operationId":"search_by_bic_search_bic__bic__get","parameters":[{"name":"bic","in":"path","required":true,"schema":{"type":"string","title":"Bic"}},{"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"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/search/isin/{isin}":{"get":{"tags":["Search"],"summary":"Search by ISIN","description":"Returns all LEI records matching the given ISIN. Accepts standard 12-character ISINs (2 uppercase letters + 10 alphanumeric). Examples: US0378331005 (Apple Inc.), GB0002634946 (BP PLC). Proxies the GLEIF API — results are authoritative and real-time.","operationId":"search_by_isin_search_isin__isin__get","parameters":[{"name":"isin","in":"path","required":true,"schema":{"type":"string","title":"Isin"}},{"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"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/group/{lei}":{"get":{"tags":["Group Structure"],"summary":"Get full corporate group structure","description":"Returns the complete group tree for a given LEI — direct parent,\n    ultimate parent, all known subsidiaries, and reporting exceptions.\n\n    Data is sourced exclusively from GLEIF Level 2 (self-reported relationships).\n    Coverage varies: financial entities under EMIR/MiFID II mandates typically\n    have 80-95% coverage. General corporates may be lower.\n\n    Response is cached for 23 hours and invalidated on each daily Golden Copy ingest.","operationId":"get_group_group__lei__get","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"name":"max_depth","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Maximum traversal depth","default":10,"title":"Max Depth"},"description":"Maximum traversal depth"},{"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/GroupStructure"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/batch":{"post":{"tags":["Batch Processing"],"summary":"Submit a batch entity resolution job","description":"Submit up to 10,000 entities for async resolution. Each entity should\n    include at least one identifier: `lei`, `name`, `registeredAs`, or `bic`.\n\n    Returns a job ID immediately. Poll `/batch/{job_id}` or provide a\n    `webhookUrl` to receive results.\n\n    **Tier limits:**\n    - Free: 10 entities/batch\n    - Pro: 1,000 entities/batch\n    - Enterprise: 10,000 entities/batch","operationId":"submit_batch_batch_post","parameters":[{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchJob"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchSubmission"}}}}}},"/batch/{job_id}":{"get":{"tags":["Batch Processing"],"summary":"Poll batch job status","operationId":"get_batch_status_batch__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","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":{"$ref":"#/components/schemas/BatchJob"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/screen/lei/{lei}":{"get":{"tags":["Sanctions Screening"],"summary":"Screen a single LEI against all sanctions lists","description":"Runs the full three-channel screening pipeline for a single LEI:\n\n    1. **Direct LEI match** — LEI appears in sanctions entry identifiers (score 1.0)\n    2. **Indirect ownership** — Entity owned ≥`ownership_threshold`% by a sanctioned party. Default 50% (OFAC rule); use 25 for EU AMLR compliance\n    3. **Name fuzzy match** — Legal name matched against all sanctions entities\n\n    Response includes a `listVersions` map for compliance audit trail.","operationId":"screen_lei_screen_lei__lei__get","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"name":"ownership_threshold","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":25,"description":"Ownership percentage threshold for indirect sanctions exposure. 50 = OFAC 50% rule (default). 25 = EU AMLR beneficial ownership threshold (effective July 2027). Lower values surface more indirect exposure but may increase false positives.","default":50,"title":"Ownership Threshold"},"description":"Ownership percentage threshold for indirect sanctions exposure. 50 = OFAC 50% rule (default). 25 = EU AMLR beneficial ownership threshold (effective July 2027). Lower values surface more indirect exposure but may increase false positives."},{"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/ScreenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/screen/name":{"post":{"tags":["Sanctions Screening"],"summary":"Screen by entity name (fuzzy + exact)","description":"Screens an entity name against all active sanctions entries.\n    Optionally accepts an associated LEI to include indirect ownership checks.","operationId":"screen_name_screen_name_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":{"$ref":"#/components/schemas/NameScreenRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/screen/portfolio":{"post":{"tags":["Sanctions Screening"],"summary":"Batch screen a portfolio of LEIs","description":"Screen up to 500 LEIs in a single request.\n    Each LEI is screened across direct LEI match, indirect ownership (50% rule),\n    and name matching channels.\n\n    Designed for portfolio re-screening workflows (Wedge C).\n    Larger portfolios should use the batch job endpoint (/batch).","operationId":"screen_portfolio_screen_portfolio_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":{"$ref":"#/components/schemas/PortfolioScreenRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioScreenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/gap-report":{"post":{"tags":["Gap Report"],"summary":"Generate a sanctions gap report for a portfolio of LEIs","description":"Screen a portfolio of LEIs against all active sanctions lists and return\na professional PDF gap report.\n\n- **GCS mode** (`GCS_REPORT_BUCKET` env var set): returns JSON with a\n  1-hour signed download URL.\n- **Direct mode** (default): returns the PDF as a binary attachment.","operationId":"post_gap_report_gap_report_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":{"$ref":"#/components/schemas/GapReportRequest"}}}},"responses":{"200":{"description":"PDF binary or JSON with download URL","content":{"application/json":{"schema":{}}}},"400":{"description":"Validation error (empty leis, limit exceeded)"},"401":{"description":"Missing or invalid API key"},"403":{"description":"Gap reports need the Pro tier or above"},"429":{"description":"Rate limit exceeded"},"500":{"description":"Internal error during report generation"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions":{"post":{"tags":["Webhooks"],"summary":"Subscribe to entity-change notifications for a LEI.","description":"Register a webhook subscription.\n\nLEISearch will POST to *callback_url* whenever the specified *lei* changes\nin the GLEIF golden copy (next nightly refresh).\n\nThe response includes a `secret` field exactly once.  Store it securely —\nit cannot be recovered.  All deliveries are signed with this secret via\nHMAC-SHA256 in the `X-LEISearch-Signature-256` header.","operationId":"create_subscription_webhooks_subscriptions_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":{"$ref":"#/components/schemas/SubscriptionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Webhooks"],"summary":"List your webhook subscriptions.","description":"Return all subscriptions owned by the authenticated API key, newest first.","operationId":"list_subscriptions_webhooks_subscriptions_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":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionResponse"},"title":"Response List Subscriptions Webhooks Subscriptions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/{subscription_id}":{"get":{"tags":["Webhooks"],"summary":"Get a single subscription.","operationId":"get_subscription_webhooks_subscriptions__subscription_id__get","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription 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":{"$ref":"#/components/schemas/SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Deactivate a subscription.","description":"Deactivates (soft-deletes) the subscription.  No further deliveries will be\nattempted.  The subscription record and delivery log are retained for audit\npurposes.","operationId":"delete_subscription_webhooks_subscriptions__subscription_id__delete","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription Id"}},{"name":"x-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/{subscription_id}/test":{"post":{"tags":["Webhooks"],"summary":"Send a synthetic test event to the subscription's callback URL.","description":"Immediately fires a synthetic `status` event to the registered callback URL.\nThe payload uses the LEI from the subscription with synthetic before/after values.\n\nUse this to verify that your endpoint is reachable and that signature verification\nworks correctly before the first real golden copy change triggers a live delivery.\n\nDelivery is asynchronous — the HTTP response returns immediately.\nCheck your endpoint's logs and the delivery log for the outcome.","operationId":"test_fire_subscription_webhooks_subscriptions__subscription_id__test_post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription 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":{"$ref":"#/components/schemas/TestFireResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/subscriptions/{subscription_id}/rotate-secret":{"post":{"tags":["Webhooks"],"summary":"Issue a new signing secret for a subscription.","description":"Replaces the subscription's signing secret. Deliveries from now on are\nsigned with the new secret, returned once in this response. Use it if a\nsecret is lost or exposed, or for subscriptions created before\nper-subscription secrets were stored.","operationId":"rotate_subscription_secret_webhooks_subscriptions__subscription_id__rotate_secret_post","parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"string","title":"Subscription 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":{"$ref":"#/components/schemas/RotateSecretResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/checkout":{"post":{"tags":["Billing"],"summary":"Create a Stripe Checkout session for the Pro plan.","description":"Returns a Stripe-hosted Checkout URL for the requested subscription tier.\nDefaults to Pro (£99/mo). Pass tier='professional' or tier='team' for higher tiers.\nRedirect the user's browser to `checkout_url` to complete payment.\nUnauthenticated, so limited per client address (RATE_LIMIT_CHECKOUT_RPM).","operationId":"create_checkout_session_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/session/{session_id}":{"get":{"tags":["Billing"],"summary":"Retrieve the API key generated for a completed checkout session.","description":"Called once by the success page after Stripe redirects the customer back.\nReturns the raw API key and deletes it from the temporary store — it cannot\nbe retrieved a second time.  If the session is unknown or has expired (> 1 hour),\na 404 is returned.","operationId":"get_session_key_billing_session__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","maxLength":128,"description":"Stripe Checkout session ID (cs_xxx).","title":"Session Id"},"description":"Stripe Checkout session ID (cs_xxx)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/portal":{"get":{"tags":["Billing"],"summary":"Generate a Stripe Customer Portal URL for the authenticated API key.","description":"Returns a short-lived Stripe Customer Portal URL where the customer can\nmanage their subscription, update payment details, or cancel.\n\nRequires the API key to be associated with a Stripe customer.  Keys\nprovisioned manually by an admin (pre-billing) will receive a 404.\n\n**Owner key only** — member seats (invited via /team/invite) cannot manage\nthe org's subscription regardless of role.","operationId":"customer_portal_billing_portal_get","parameters":[{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":35},{"type":"null"}],"description":"Language of the portal and the return page. Default: the key's language.","title":"Language"},"description":"Language of the portal and the return page. Default: the key's language."},{"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/PortalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/upgrade":{"post":{"tags":["Billing"],"summary":"Create a Stripe Checkout session to upgrade to a higher tier.","description":"Returns a Stripe-hosted URL to move the authenticated key's subscription\nto `professional` (£499/mo) or `team` (£999/mo).\n\nWith a live subscription this is Stripe's customer portal, confirming a\nprorated plan change on that same subscription (never a second one);\nafter a cancellation it is a new Checkout. The key must already have a\nStripe customer ID (provisioned via checkout, not manually). Stripe then\nfires `customer.subscription.updated` / `checkout.session.completed`,\nwhich set the key's tier from the price.\n\n**Owner key only** — member seats (invited via /team/invite) cannot change\nthe org's subscription tier regardless of role.","operationId":"upgrade_subscription_billing_upgrade_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":{"$ref":"#/components/schemas/UpgradeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/partner-credits":{"post":{"tags":["Billing"],"summary":"Buy partner credits for KYB / UBO checks answered by a partner.","description":"Returns a Stripe Checkout URL for a monthly credit pack (10, 50 or 200 credits a\nmonth: its own subscription, cancel it any time in the billing portal) or for\npay-as-you-go credits (one payment, valid 12 months). Credits are added when Stripe\nconfirms the payment. Paid plans only; **owner key only**. 409 until partner checks\nare available.","operationId":"buy_partner_credits_billing_partner_credits_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":{"$ref":"#/components/schemas/PartnerCreditPurchase"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/referrals/renewal-partner":{"get":{"tags":["Referrals"],"summary":"Renewal partner for the 'Renew via partner' CTA","description":"Returns the display name and referral link for the partner configured\n    via `RENEWAL_PARTNER_CODE`, if one is set and the partner still exists\n    and is active. Returns `null` (200, empty body) if no partner is\n    configured or the configured code is no longer active -- the frontend\n    treats either as \"hide the CTA\", so a misconfigured/deactivated code\n    fails safe rather than showing a broken link.\n\n    Professional tier and above (same gate as the risk-context drill-down\n    that surfaces `registration_health.renewal_risk`, which is what the\n    dashboard uses to decide whether to show this CTA at all).","operationId":"get_renewal_partner_referrals_renewal_partner_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":{"anyOf":[{"$ref":"#/components/schemas/RenewalPartner"},{"type":"null"}],"title":"Response Get Renewal Partner Referrals Renewal Partner Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lei/{lei}/risk-context":{"get":{"tags":["Risk Context"],"summary":"Entity risk context: transparency, sanctions proximity, registration health","operationId":"risk_context_lei__lei__risk_context_get","parameters":[{"name":"lei","in":"path","required":true,"schema":{"type":"string","title":"Lei"}},{"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/RiskContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/portfolio/analytics":{"get":{"tags":["Portfolio"],"summary":"Book-level analytics across the monitored portfolio","operationId":"portfolio_analytics_portfolio_analytics_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":{"$ref":"#/components/schemas/PortfolioAnalytics"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/validate/bulk":{"post":{"tags":["Bulk Validation"],"summary":"Bulk LEI validation and enrichment","description":"Validate up to **500 LEIs** (Professional) or **5 000 LEIs** (Team/Enterprise)\nin a single request.\n\nFor each LEI the response includes:\n- Current GLEIF **entity status** (ACTIVE / INACTIVE)\n- **LEI registration status** (ISSUED / LAPSED / MERGED / RETIRED / …)\n- **Next renewal date** for proactive lapse management\n- **Jurisdiction** (ISO 3166-2)\n- A **sanctions flag** — `true` if a high-confidence (≥ 95%) active sanctions\n  match exists in LEISearch's sanctions database\n\nUse this endpoint to batch-validate a counterparty list, enrich a trading book,\nor power a \"paste and validate\" compliance workflow.\n\n**Authentication:** `X-Api-Key` header required (Professional tier or above).","operationId":"bulk_validate_validate_bulk_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":{"$ref":"#/components/schemas/BulkValidateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkValidateResponse"}}}},"400":{"description":"Batch too large for your tier, or invalid LEI format"},"403":{"description":"Professional tier or above required"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/alerts/lapsed":{"get":{"tags":["Alerts"],"summary":"Lapsed LEI alert history","description":"Returns the history of lapsed-LEI alerts generated by the nightly monitor for the authenticated API key's portfolio. Alerts are created when an entity's LEI registration status enters a non-ISSUED state (LAPSED, RETIRED, MERGED, etc.) and resolved when it returns to ISSUED.\n\nRequires **Professional** tier or above.","operationId":"get_lapsed_alerts_alerts_lapsed_get","parameters":[{"name":"resolved","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by resolved state. true = resolved only, false = active only, omit = all.","title":"Resolved"},"description":"Filter by resolved state. true = resolved only, false = active only, omit = all."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Max items to return","default":50,"title":"Limit"},"description":"Max items to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Items to skip","default":0,"title":"Offset"},"description":"Items to skip"},{"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/LapsedAlertsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/dashboard":{"post":{"tags":["Chat"],"summary":"Dashboard help chatbot","description":"Retrieval-grounded help chatbot for the LEISearch dashboard UI. Answers are grounded in the live dashboard's own nav/feature content (kb_chunks, re-indexed daily) -- not a general-purpose assistant, and not aware of the caller's own account data.\n\nRate-limited separately from the main product API.","operationId":"chat_dashboard_chat_dashboard_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":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chat/public":{"post":{"tags":["Chat"],"summary":"Public site chatbot","description":"Retrieval-grounded chatbot for anonymous leisearch.pro visitors -- FAQ, pricing, and API capabilities. Answers are grounded in the live site's own content (kb_chunks, re-indexed daily). No authentication -- rate-limited by client IP instead of API key.","operationId":"chat_public_chat_public_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AcceptRequest":{"properties":{"token":{"type":"string","maxLength":200,"minLength":10,"title":"Token","description":"Invite token from your email."},"language":{"type":"string","title":"Language","description":"Language for the new member's e-mails (en, es, de, fr, zh, pt). Anything else becomes English.","default":"en"}},"type":"object","required":["token"],"title":"AcceptRequest"},"AcceptResponse":{"properties":{"api_key":{"type":"string","title":"Api Key","description":"Your LEISearch API key. Store it securely — shown only once."},"key_prefix":{"type":"string","title":"Key Prefix"},"tier":{"type":"string","title":"Tier"},"message":{"type":"string","title":"Message","default":"Store this key securely. It will not be shown again."}},"type":"object","required":["api_key","key_prefix","tier"],"title":"AcceptResponse"},"AccountErasureResponse":{"properties":{"message":{"type":"string","title":"Message"},"scope":{"type":"string","title":"Scope"},"member_keys_erased":{"type":"integer","title":"Member Keys Erased"},"stripe_subscription_cancelled":{"type":"boolean","title":"Stripe Subscription Cancelled"},"audit_log_entries_anonymized":{"type":"integer","title":"Audit Log Entries Anonymized"},"records_deleted":{"additionalProperties":{"type":"integer"},"type":"object","title":"Records Deleted"},"retained_for_legal_reasons":{"items":{"type":"string"},"type":"array","title":"Retained For Legal Reasons"}},"type":"object","required":["message","scope","member_keys_erased","stripe_subscription_cancelled","audit_log_entries_anonymized","records_deleted","retained_for_legal_reasons"],"title":"AccountErasureResponse"},"AdverseMedia":{"properties":{"status":{"type":"string","title":"Status","description":"PENDING | CLEAR | MATCHES_FOUND"},"match_count":{"type":"integer","title":"Match Count"},"matches":{"items":{"$ref":"#/components/schemas/AdverseMediaMatch"},"type":"array","title":"Matches"},"last_screened_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Screened At","description":"None while status=PENDING (never yet screened)."},"beta":{"type":"boolean","title":"Beta","description":"Best-effort keyword-category matching, not verified entity resolution.","default":true},"explanation":{"type":"string","title":"Explanation"}},"type":"object","required":["status","match_count","explanation"],"title":"AdverseMedia","description":"Adverse media (negative news) screening -- Session 4, migration 037.\nBETA / best-effort: keyword-category matching via GDELT against\nlegal_name, NOT full NLP entity resolution -- common legal names WILL\nproduce false positives. Always present with a human-review affordance,\nnever treated as a silent verdict change (see etl/adverse_media_job.py's\nmodule docstring).\n\nScoped to eligible LEIs only (watched portfolio or CDD-onboarded --\nsee migration 037's header comment) -- for every other LEI, the parent\nRiskContextResponse.adverse_media field is None entirely, not this\nmodel with a placeholder status, mirroring how uk_psc_cross_check\nhandles non-GB entities."},"AdverseMediaMatch":{"properties":{"article_url":{"type":"string","title":"Article Url"},"headline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headline"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"Source article language as reported by GDELT (e.g. \"English\", \"Italian\"). None if GDELT omitted it or the match predates this field."},"headline_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headline En","description":"Machine-translated (Google Cloud Translation) English rendering of `headline`. None means: article was already English, or translation was not attempted/failed -- in either case, display `headline` as the fallback, never treat None as an error. Only ever populated for non-English matches (see etl/adverse_media_job.py)."},"translate_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Translate Url","description":"Google Translate link to the full original article (not just the headline) -- present only when `language` is non-English, regardless of whether headline_en succeeded, so a reviewer can always read the full source in English."},"source_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Domain"},"source_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Country"},"published_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Published At"},"category":{"type":"string","title":"Category","description":"FRAUD | FINANCIAL_CRIME | CORRUPTION | SANCTIONS_RELATED | REGULATORY_ACTION | OTHER"},"matched_keyword":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matched Keyword"}},"type":"object","required":["article_url","category"],"title":"AdverseMediaMatch"},"AdverseMediaSummary":{"properties":{"status":{"type":"string","title":"Status","description":"PENDING_FIRST_SCREEN | CLEAR | MATCHES_FOUND"},"matchCount":{"type":"integer","title":"Matchcount"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories","description":"Distinct categories among active matches"},"beta":{"type":"boolean","title":"Beta","default":true},"explanation":{"type":"string","title":"Explanation"}},"type":"object","required":["status","matchCount","explanation"],"title":"AdverseMediaSummary","description":"Adverse media (negative news) screening -- Session 4, migration 037.\nUnlike risk.py's AdverseMedia (which is None for ineligible LEIs),\nthis field is ALWAYS present here: calling POST /cdd/onboard is itself\nwhat registers a LEI as eligible for adverse media screening going\nforward (see _record_cdd_onboarding below), so there is no\n\"ineligible\" state in this context -- only \"not screened yet\"\n(pendingFirstScreen) vs. an actual result from a prior screening run.\nBETA / best-effort -- see etl/adverse_media_job.py's module docstring."},"AuditPdfRequest":{"properties":{"preparedBy":{"type":"string","maxLength":80,"title":"Preparedby","description":"Name shown on the report sign-off block","default":""},"clientName":{"type":"string","maxLength":80,"title":"Clientname","description":"Client organisation name on the cover","default":""},"reportSettings":{"$ref":"#/components/schemas/AuditSettings","description":"Optional PDF customisation — colours, fonts, section toggles"}},"type":"object","title":"AuditPdfRequest"},"AuditSettings":{"properties":{"classificationLabel":{"type":"string","maxLength":24,"pattern":"^[A-Za-z0-9 ._/()-]+$","title":"Classificationlabel","description":"Badge / footer label. E.g. CONFIDENTIAL, RESTRICTED, LIMITED, INTERNAL, PUBLIC","default":"CONFIDENTIAL"},"accentColor":{"type":"string","pattern":"^#?[0-9a-fA-F]{6}$","title":"Accentcolor","description":"Primary accent hex colour — gold strip, borders, section separators","default":"#eab308"},"coverBgColor":{"type":"string","pattern":"^#?[0-9a-fA-F]{6}$","title":"Coverbgcolor","description":"Cover page background hex colour","default":"#09090b"},"sectionColor":{"type":"string","pattern":"^#?[0-9a-fA-F]{6}$","title":"Sectioncolor","description":"Section heading text hex colour (shown on white body pages)","default":"#18181b"},"bodyFontSize":{"type":"number","maximum":12.0,"minimum":6.0,"title":"Bodyfontsize","description":"Body text font size in pt (6–12)","default":8.5},"sectionFontSize":{"type":"number","maximum":16.0,"minimum":8.0,"title":"Sectionfontsize","description":"Section heading font size in pt (8–16)","default":10.0},"includeOwnership":{"type":"boolean","title":"Includeownership","description":"Include ownership structure section","default":true},"includeSanctions":{"type":"boolean","title":"Includesanctions","description":"Include sanctions exposure section","default":true},"includeJurisdictionRisk":{"type":"boolean","title":"Includejurisdictionrisk","description":"Include jurisdiction risk overlay section","default":true},"includeDataSources":{"type":"boolean","title":"Includedatasources","description":"Include data sources and methodology section","default":true}},"type":"object","title":"AuditSettings","description":"Optional per-request PDF customisation. All fields have defaults."},"AuthUrlResponse":{"properties":{"authUrl":{"type":"string","title":"Authurl","description":"OAuth authorization URL to redirect the user to"},"state":{"type":"string","title":"State","description":"CSRF state token (opaque, for verification)"}},"type":"object","required":["authUrl","state"],"title":"AuthUrlResponse"},"BatchJob":{"properties":{"jobId":{"type":"string","title":"Jobid"},"status":{"type":"string","title":"Status"},"totalEntities":{"type":"integer","title":"Totalentities"},"processedEntities":{"type":"integer","title":"Processedentities"},"failedEntities":{"type":"integer","title":"Failedentities"},"webhookUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhookurl"},"webhookSecret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhooksecret","description":"Returned once, on submission with a webhookUrl: the completion callback's X-LEISearch-Signature header is sha256=HMAC-SHA256(webhookSecret, body)."},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completedat"},"resultUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resulturl"},"results":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Results","description":"Per-entity results, in submission order, once status is 'completed'. Kept for 30 days after the job is submitted."}},"type":"object","required":["jobId","status","totalEntities","processedEntities","failedEntities","createdAt"],"title":"BatchJob"},"BulkItem":{"properties":{"lei":{"type":"string","maxLength":40,"title":"Lei"},"roles":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":30},{"type":"null"}],"title":"Roles","description":"Overrides the request's roles."},"as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of"},"reference":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Reference","description":"Your own row reference, echoed back."}},"additionalProperties":false,"type":"object","required":["lei"],"title":"BulkItem"},"BulkValidateEntry":{"properties":{"lei":{"type":"string","title":"Lei","description":"LEI code"},"row":{"type":"integer","title":"Row","description":"1-based row index in input"},"found":{"type":"boolean","title":"Found","description":"True if LEI exists in GLEIF golden copy"},"legalName":{"type":"string","title":"Legalname","description":"Registered legal name","default":""},"entityStatus":{"type":"string","title":"Entitystatus","description":"ACTIVE | INACTIVE | UNKNOWN","default":"UNKNOWN"},"registrationStatus":{"type":"string","title":"Registrationstatus","description":"ISSUED | LAPSED | … | UNKNOWN","default":"UNKNOWN"},"nextRenewalDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextrenewaldate","description":"ISO date of next renewal"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction","description":"ISO 3166-2 jurisdiction"},"isValid":{"type":"boolean","title":"Isvalid","description":"registrationStatus == ISSUED","default":false},"isActive":{"type":"boolean","title":"Isactive","description":"entityStatus == ACTIVE","default":false},"sanctionsFlag":{"type":"boolean","title":"Sanctionsflag","description":"High-confidence sanctions hit exists (score ≥ 0.95)","default":false}},"type":"object","required":["lei","row","found"],"title":"BulkValidateEntry"},"BulkValidateRequest":{"properties":{"leis":{"items":{"type":"string"},"type":"array","maxItems":5000,"minItems":1,"title":"Leis","description":"LEI codes to validate (1–5 000)"}},"type":"object","required":["leis"],"title":"BulkValidateRequest"},"BulkValidateResponse":{"properties":{"total":{"type":"integer","title":"Total","description":"Total LEIs submitted"},"issued":{"type":"integer","title":"Issued","description":"LEIs with registrationStatus = ISSUED"},"lapsed":{"type":"integer","title":"Lapsed","description":"LEIs with non-ISSUED status (excl. not found)"},"not_found":{"type":"integer","title":"Not Found","description":"LEIs not in GLEIF golden copy"},"flagged":{"type":"integer","title":"Flagged","description":"LEIs with a high-confidence sanctions flag"},"results":{"items":{"$ref":"#/components/schemas/BulkValidateEntry"},"type":"array","title":"Results"}},"type":"object","required":["total","issued","lapsed","not_found","flagged","results"],"title":"BulkValidateResponse"},"CaspCheckResponse":{"properties":{"lei":{"type":"string","title":"Lei"},"isCasp":{"type":"boolean","title":"Iscasp"},"casp":{"anyOf":[{"$ref":"#/components/schemas/CaspRecord"},{"type":"null"}]}},"type":"object","required":["lei","isCasp"],"title":"CaspCheckResponse"},"CaspListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"results":{"items":{"$ref":"#/components/schemas/CaspRecord"},"type":"array","title":"Results"}},"type":"object","required":["total","results"],"title":"CaspListResponse"},"CaspRecord":{"properties":{"lei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lei"},"legalName":{"type":"string","title":"Legalname"},"commercialName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Commercialname"},"homeMemberState":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Homememberstate"},"competentAuthority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Competentauthority"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"authorisedServices":{"items":{"type":"string"},"type":"array","title":"Authorisedservices"},"passportedCountries":{"items":{"type":"string"},"type":"array","title":"Passportedcountries"},"authorisationDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorisationdate"},"authorisationEndDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorisationenddate"},"isActive":{"type":"boolean","title":"Isactive"},"lastEsmaUpdate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastesmaupdate"}},"type":"object","required":["lei","legalName","commercialName","homeMemberState","competentAuthority","website","authorisedServices","passportedCountries","authorisationDate","authorisationEndDate","isActive","lastEsmaUpdate"],"title":"CaspRecord"},"CddRequest":{"properties":{"lei":{"type":"string","title":"Lei","description":"20-character LEI to onboard"},"ownership_threshold":{"type":"integer","maximum":100.0,"minimum":25.0,"title":"Ownership Threshold","description":"Ownership threshold for indirect screening (25 = EU AMLR, 50 = OFAC default)","default":50},"include_ownership":{"type":"boolean","title":"Include Ownership","description":"Include ownership chain in response","default":true},"client_reference":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Client Reference","description":"Your internal case/client reference ID"},"include_kyb":{"type":"boolean","title":"Include Kyb","description":"Also run the KYB / UBO ownership check (owners and beneficial owners, each checked against sanctions lists; Pro and above, countries in GET /coverage). Uses one of your plan's monthly KYB checks. An owner found on a sanctions list makes overallRisk HIGH.","default":false}},"type":"object","required":["lei"],"title":"CddRequest"},"CddSummary":{"properties":{"lei":{"type":"string","title":"Lei"},"legalName":{"type":"string","title":"Legalname"},"entityStatus":{"type":"string","title":"Entitystatus"},"registrationStatus":{"type":"string","title":"Registrationstatus"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"leiValid":{"type":"boolean","title":"Leivalid","description":"True if registration_status = ISSUED and entity_status = ACTIVE"},"leiLapsed":{"type":"boolean","title":"Leilapsed","description":"True if registration_status is non-ISSUED"},"sanctionsVerdict":{"type":"string","title":"Sanctionsverdict","description":"CLEAR | DIRECT_HIT | INDIRECT_EXPOSURE | POTENTIAL_MATCH | PEP_MATCH"},"sanctionsHits":{"items":{"$ref":"#/components/schemas/SanctionsHit"},"type":"array","title":"Sanctionshits"},"directHitCount":{"type":"integer","title":"Directhitcount"},"indirectHitCount":{"type":"integer","title":"Indirecthitcount"},"ownershipDepth":{"type":"integer","title":"Ownershipdepth","description":"Number of levels in ownership chain"},"ownershipNodes":{"items":{"$ref":"#/components/schemas/OwnershipNode"},"type":"array","title":"Ownershipnodes"},"jurisdictionRisk":{"$ref":"#/components/schemas/api__routes__cdd__JurisdictionRisk"},"ownershipJurisdictionRisks":{"items":{"$ref":"#/components/schemas/api__routes__cdd__JurisdictionRisk"},"type":"array","title":"Ownershipjurisdictionrisks"},"adverseMedia":{"$ref":"#/components/schemas/AdverseMediaSummary"},"vendorScreening":{"$ref":"#/components/schemas/VendorScreeningSummary"},"overallRisk":{"type":"string","title":"Overallrisk","description":"LOW | MEDIUM | HIGH | SANCTIONS_HIT | PEP_ELEVATED"},"riskFactors":{"items":{"type":"string"},"type":"array","title":"Riskfactors","description":"Human-readable risk factors driving the verdict"},"regulatoryFlags":{"items":{"type":"string"},"type":"array","title":"Regulatoryflags","description":"Specific regulatory concerns (e.g. lapsed LEI under MiFID II)"},"micaCasp":{"type":"boolean","title":"Micacasp","description":"True if LEI is an authorised MiCA CASP (ESMA register)"},"screenedAt":{"type":"string","title":"Screenedat"},"ownershipThreshold":{"type":"integer","title":"Ownershipthreshold"},"clientReference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clientreference"}},"type":"object","required":["lei","legalName","entityStatus","registrationStatus","jurisdiction","leiValid","leiLapsed","sanctionsVerdict","sanctionsHits","directHitCount","indirectHitCount","ownershipDepth","ownershipNodes","jurisdictionRisk","ownershipJurisdictionRisks","adverseMedia","vendorScreening","overallRisk","riskFactors","regulatoryFlags","micaCasp","screenedAt","ownershipThreshold","clientReference"],"title":"CddSummary"},"ChangeEvent":{"properties":{"date":{"type":"string","title":"Date"},"fields_changed":{"items":{"type":"string"},"type":"array","title":"Fields Changed"},"registration_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Status"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"}},"type":"object","required":["date","fields_changed"],"title":"ChangeEvent"},"ChangeHistory":{"properties":{"snapshots_available":{"type":"boolean","title":"Snapshots Available","description":"False when no history has accrued yet for this entity."},"lapse_count":{"type":"integer","title":"Lapse Count","description":"Times the LEI entered LAPSED in the recorded history.","default":0},"name_change_count":{"type":"integer","title":"Name Change Count","default":0},"status_change_count":{"type":"integer","title":"Status Change Count","default":0},"renewal_discipline":{"type":"string","title":"Renewal Discipline","description":"GOOD | WATCH | POOR | UNKNOWN"},"recent_changes":{"items":{"$ref":"#/components/schemas/ChangeEvent"},"type":"array","title":"Recent Changes","description":"Most recent first, max 10."}},"type":"object","required":["snapshots_available","renewal_discipline"],"title":"ChangeHistory"},"ChatMessage":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"content":{"type":"string","maxLength":2000,"minLength":1,"title":"Content"}},"type":"object","required":["role","content"],"title":"ChatMessage"},"ChatRequest":{"properties":{"message":{"type":"string","maxLength":2000,"minLength":1,"title":"Message"},"history":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","maxItems":20,"title":"History"},"language":{"type":"string","title":"Language","default":"en"}},"type":"object","required":["message"],"title":"ChatRequest"},"ChatResponse":{"properties":{"reply":{"type":"string","title":"Reply"}},"type":"object","required":["reply"],"title":"ChatResponse"},"CheckoutRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Customer email address."},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name","description":"Customer or company name."},"tier":{"type":"string","title":"Tier","description":"Subscription tier: 'pro', 'professional', or 'team'.","default":"pro"},"ref":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Ref","description":"Optional referral partner code."},"language":{"type":"string","title":"Language","description":"Site language (en, es, de, fr, zh, pt): Stripe Checkout's language, the return pages and the key's e-mails. Anything else becomes English.","default":"en"}},"type":"object","required":["email","name"],"title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url","description":"Stripe-hosted checkout page. Redirect the browser here."}},"type":"object","required":["checkout_url"],"title":"CheckoutResponse"},"ConfirmRequest":{"properties":{"code":{"type":"string","maxLength":100,"minLength":20,"title":"Code","description":"The one-time code from the dashboard redirect after consent."}},"type":"object","required":["code"],"title":"ConfirmRequest"},"ConfirmResponse":{"properties":{"connectorType":{"type":"string","title":"Connectortype"},"connected":{"type":"boolean","title":"Connected"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalid"}},"type":"object","required":["connectorType","connected"],"title":"ConfirmResponse"},"ConnectorListResponse":{"properties":{"connectors":{"items":{"$ref":"#/components/schemas/ConnectorStatus"},"type":"array","title":"Connectors"}},"type":"object","required":["connectors"],"title":"ConnectorListResponse"},"ConnectorStatus":{"properties":{"connectorType":{"type":"string","title":"Connectortype","description":"Connector identifier"},"displayName":{"type":"string","title":"Displayname","description":"Human-readable connector name"},"isConnected":{"type":"boolean","title":"Isconnected","description":"True if OAuth tokens are stored"},"externalId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Externalid","description":"Provider identity (email, org ID)"},"lastSyncedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastsyncedat","description":"ISO 8601 timestamp of last sync"},"lastSyncStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastsyncstatus","description":"ok | error | pending"},"lastSyncError":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastsyncerror","description":"Error message from last sync, if any"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Connector-specific config"}},"type":"object","required":["connectorType","displayName","isConnected"],"title":"ConnectorStatus"},"CountryCoverage":{"properties":{"code":{"type":"string","title":"Code","description":"ISO country code; CA-FED = federal Canadian corporations; US / CA rows with status not_offered group the state and provincial registers."},"name":{"type":"string","title":"Name"},"region":{"type":"string","title":"Region"},"source":{"type":"string","title":"Source","description":"in_house (LEISearch register data) | partner (partner data)"},"status":{"type":"string","title":"Status","description":"live | coming_soon | not_offered | on_request"},"profile":{"type":"boolean","title":"Profile"},"shareholders":{"type":"boolean","title":"Shareholders"},"beneficialOwners":{"type":"boolean","title":"Beneficialowners"},"credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits","description":"Partner credits one check uses (partner rows)."},"manualBeneficialOwnersCredits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Manualbeneficialownerscredits","description":"Partner credits of an optional manual beneficial-owner order (1-3 business days; not available yet)."},"notes":{"items":{"type":"string"},"type":"array","title":"Notes","description":"Note codes."},"partnerBeneficialOwners":{"anyOf":[{"$ref":"#/components/schemas/PartnerPartCoverage"},{"type":"null"}],"description":"In-house rows whose check adds the beneficial owners from a partner when partner checks are on (Estonia): their status and partner credits. Null elsewhere."}},"type":"object","required":["code","name","region","source","status","profile","shareholders","beneficialOwners"],"title":"CountryCoverage"},"CoverageResponse":{"properties":{"partnerChecks":{"$ref":"#/components/schemas/PartnerSwitch"},"plan":{"$ref":"#/components/schemas/PlanAllowance"},"balance":{"anyOf":[{"$ref":"#/components/schemas/CreditBalanceView"},{"type":"null"}],"description":"Partner credits left (null until the credit ledger is set up)."},"buy":{"$ref":"#/components/schemas/CreditProducts"},"countries":{"items":{"$ref":"#/components/schemas/CountryCoverage"},"type":"array","title":"Countries"}},"type":"object","required":["partnerChecks","plan","buy","countries"],"title":"CoverageResponse"},"CreditBalanceView":{"properties":{"included":{"type":"integer","title":"Included"},"pack":{"type":"integer","title":"Pack"},"paygo":{"type":"integer","title":"Paygo"},"adjustment":{"type":"integer","title":"Adjustment"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["included","pack","paygo","adjustment","total"],"title":"CreditBalanceView"},"CreditProducts":{"properties":{"available":{"type":"boolean","title":"Available","description":"Credits can be bought now (owner keys on a paid plan)."},"packs":{"additionalProperties":{"type":"integer"},"type":"object","title":"Packs","description":"Monthly packs: credits -> GBP per month (VAT on top)."},"paygoCreditGbp":{"type":"integer","title":"Paygocreditgbp"},"paygoMaxCredits":{"type":"integer","title":"Paygomaxcredits"},"paygoValidityDays":{"type":"integer","title":"Paygovaliditydays"}},"type":"object","required":["available","packs","paygoCreditGbp","paygoMaxCredits","paygoValidityDays"],"title":"CreditProducts"},"DataQualityFinding":{"properties":{"code":{"type":"string","title":"Code","description":"LEI_NOT_LIVE | ENTITY_INACTIVE | CORROBORATION_PENDING | ENTITY_SUPPLIED_ONLY | PARTIALLY_CORROBORATED | NON_CONFORMING | PARENT_NOT_CORROBORATED"},"severity":{"type":"string","title":"Severity","description":"high | medium | info"},"field":{"type":"string","title":"Field","description":"The GLEIF field the finding comes from."},"message":{"type":"string","title":"Message"},"points":{"type":"integer","title":"Points","description":"Points taken off the registration subscore (0 = shown only)."}},"type":"object","required":["code","severity","field","message","points"],"title":"DataQualityFinding"},"DataQualitySection":{"properties":{"registration_score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Registration Score","description":"The health score's registration dimension, after the findings."},"findings":{"items":{"$ref":"#/components/schemas/DataQualityFinding"},"type":"array","title":"Findings"},"conformity_causes":{"items":{"type":"string"},"type":"array","title":"Conformity Causes","description":"For a NON_CONFORMING record, the likely causes our copy of GLEIF's data shows: RENEWAL_NOT_CURRENT, LEVEL2_INCOMPLETE, RELATIONSHIP_LAPSED (a parent relationship record wasn't renewed); empty = none visible in the data we hold."}},"type":"object","required":["registration_score"],"title":"DataQualitySection"},"DataQualitySummary":{"properties":{"entities_with_findings":{"type":"integer","title":"Entities With Findings","description":"Entities with at least one finding (any severity)."},"by_code":{"additionalProperties":true,"type":"object","title":"By Code","description":"{finding code: number of entities}, codes as in GET /lei/{lei}/risk-context data_quality."},"level2_incomplete":{"type":"integer","title":"Level2 Incomplete","description":"Non-conforming entities whose parent reporting our data shows as incomplete.","default":0},"examples":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Examples","description":"[{lei, legal_name, codes}] entities with high or medium findings, lowest registration score first, max 25."}},"type":"object","required":["entities_with_findings"],"title":"DataQualitySummary"},"DeleteAccountRequest":{"properties":{"confirm_email":{"type":"string","format":"email","title":"Confirm Email"}},"type":"object","required":["confirm_email"],"title":"DeleteAccountRequest"},"EntryCreate":{"properties":{"status":{"anyOf":[{"type":"string","enum":["PLANNED","ACTIVE","TERMINATED"]},{"type":"null"}],"title":"Status"},"terminated_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Terminated On"},"arrangement_ref":{"type":"string","maxLength":100,"minLength":1,"title":"Arrangement Ref","description":"2.01"},"provider_name":{"type":"string","maxLength":255,"minLength":1,"title":"Provider Name","description":"2.02"},"lei":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Lei","description":"2.03; empty or N/A if none"},"is_outsourcing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Outsourcing","description":"2.04: true = Outsourcing"},"service_types":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":38},{"type":"null"}],"title":"Service Types","description":"2.05"},"cloud_deployments":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":4},{"type":"null"}],"title":"Cloud Deployments","description":"2.06"},"service_description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Service Description","description":"2.07"},"supply_chain_rank":{"anyOf":[{"type":"integer","maximum":20.0,"minimum":0.0},{"type":"null"}],"title":"Supply Chain Rank","description":"2.08"},"contract_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Contract Start","description":"2.09"},"service_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Service Start","description":"2.10"},"renewal_or_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Renewal Or End Date","description":"2.11"},"evergreen":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Evergreen","description":"2.11 = 9999-12-31"},"provider_notice_days":{"anyOf":[{"type":"integer","maximum":36500.0,"minimum":0.0},{"type":"null"}],"title":"Provider Notice Days","description":"2.12"},"firm_notice_days":{"anyOf":[{"type":"integer","maximum":36500.0,"minimum":0.0},{"type":"null"}],"title":"Firm Notice Days","description":"2.13"},"governing_laws":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Governing Laws","description":"2.14"},"materiality_reasons":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":12},{"type":"null"}],"title":"Materiality Reasons","description":"3.01"},"materiality_assessed_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Materiality Assessed On","description":"3.02"},"function_categories":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":69},{"type":"null"}],"title":"Function Categories","description":"3.03"},"supports_ibs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Ibs","description":"3.04"},"ibs_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Ibs Name","description":"3.05"},"core_to_ibs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Core To Ibs","description":"3.06"},"function_ibs":{"anyOf":[{"items":{"$ref":"#/components/schemas/FunctionIbs"},"type":"array","maxItems":69},{"type":"null"}],"title":"Function Ibs","description":"3.05/3.06 per function category, where they differ (FCA FG26/4 6.9); functions not listed use ibs_name / core_to_ibs"},"tol_pra_safety_hours":{"anyOf":[{"type":"number","maximum":99999.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Tol Pra Safety Hours"},"tol_pra_stability_hours":{"anyOf":[{"type":"number","maximum":99999.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Tol Pra Stability Hours"},"tol_pra_policyholder_hours":{"anyOf":[{"type":"number","maximum":99999.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Tol Pra Policyholder Hours"},"tol_fca_client_harm_hours":{"anyOf":[{"type":"number","maximum":99999.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Tol Fca Client Harm Hours"},"tol_fca_market_hours":{"anyOf":[{"type":"number","maximum":99999.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Tol Fca Market Hours"},"tol_boe_fmi_hours":{"anyOf":[{"type":"number","maximum":99999.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Tol Boe Fmi Hours"},"tolerances_not_set":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tolerances Not Set","description":"3.07-3.12 'Not done' (notifications)"},"data_storage_countries":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Data Storage Countries","description":"3.13"},"service_delivery_countries":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Service Delivery Countries","description":"3.14"},"annual_contract_value_gbp":{"anyOf":[{"type":"integer","maximum":1000000000000000.0,"minimum":0.0},{"type":"null"}],"title":"Annual Contract Value Gbp","description":"3.15, whole pounds"},"risk_assessed_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Risk Assessed On"},"risk_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Outcome"},"risk_commentary":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Risk Commentary"},"audit_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Audit On"},"audit_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audit Outcome"},"financial_dd_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Financial Dd On"},"financial_dd_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Financial Dd Outcome"},"cyber_dd_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Cyber Dd On"},"cyber_dd_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cyber Dd Outcome"},"compliance_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compliance Status"},"assurance_summary":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Assurance Summary"},"smf_signed_off":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Smf Signed Off"},"governance_committee":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Governance Committee"},"governance_approved_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Governance Approved On"},"substitutability":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Substitutability"},"reintegration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reintegration"},"discontinuation_impact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discontinuation Impact"},"renewal_changes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Renewal Changes","description":"1.07"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes","description":"internal; never exported"}},"additionalProperties":false,"type":"object","required":["arrangement_ref","provider_name"],"title":"EntryCreate"},"EntryPatch":{"properties":{"status":{"anyOf":[{"type":"string","enum":["PLANNED","ACTIVE","TERMINATED"]},{"type":"null"}],"title":"Status"},"terminated_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Terminated On"},"arrangement_ref":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Arrangement Ref","description":"2.01"},"provider_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Provider Name","description":"2.02, as in the contract"},"lei":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Lei","description":"2.03; empty or N/A if none"},"is_outsourcing":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Outsourcing","description":"2.04: true = Outsourcing"},"service_types":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":38},{"type":"null"}],"title":"Service Types","description":"2.05"},"cloud_deployments":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":4},{"type":"null"}],"title":"Cloud Deployments","description":"2.06"},"service_description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Service Description","description":"2.07"},"supply_chain_rank":{"anyOf":[{"type":"integer","maximum":20.0,"minimum":0.0},{"type":"null"}],"title":"Supply Chain Rank","description":"2.08"},"contract_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Contract Start","description":"2.09"},"service_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Service Start","description":"2.10"},"renewal_or_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Renewal Or End Date","description":"2.11"},"evergreen":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Evergreen","description":"2.11 = 9999-12-31"},"provider_notice_days":{"anyOf":[{"type":"integer","maximum":36500.0,"minimum":0.0},{"type":"null"}],"title":"Provider Notice Days","description":"2.12"},"firm_notice_days":{"anyOf":[{"type":"integer","maximum":36500.0,"minimum":0.0},{"type":"null"}],"title":"Firm Notice Days","description":"2.13"},"governing_laws":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Governing Laws","description":"2.14"},"materiality_reasons":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":12},{"type":"null"}],"title":"Materiality Reasons","description":"3.01"},"materiality_assessed_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Materiality Assessed On","description":"3.02"},"function_categories":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":69},{"type":"null"}],"title":"Function Categories","description":"3.03"},"supports_ibs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Supports Ibs","description":"3.04"},"ibs_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Ibs Name","description":"3.05"},"core_to_ibs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Core To Ibs","description":"3.06"},"function_ibs":{"anyOf":[{"items":{"$ref":"#/components/schemas/FunctionIbs"},"type":"array","maxItems":69},{"type":"null"}],"title":"Function Ibs","description":"3.05/3.06 per function category, where they differ (FCA FG26/4 6.9); functions not listed use ibs_name / core_to_ibs"},"tol_pra_safety_hours":{"anyOf":[{"type":"number","maximum":99999.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Tol Pra Safety Hours"},"tol_pra_stability_hours":{"anyOf":[{"type":"number","maximum":99999.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Tol Pra Stability Hours"},"tol_pra_policyholder_hours":{"anyOf":[{"type":"number","maximum":99999.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Tol Pra Policyholder Hours"},"tol_fca_client_harm_hours":{"anyOf":[{"type":"number","maximum":99999.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Tol Fca Client Harm Hours"},"tol_fca_market_hours":{"anyOf":[{"type":"number","maximum":99999.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Tol Fca Market Hours"},"tol_boe_fmi_hours":{"anyOf":[{"type":"number","maximum":99999.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Tol Boe Fmi Hours"},"tolerances_not_set":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tolerances Not Set","description":"3.07-3.12 'Not done' (notifications)"},"data_storage_countries":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Data Storage Countries","description":"3.13"},"service_delivery_countries":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":20},{"type":"null"}],"title":"Service Delivery Countries","description":"3.14"},"annual_contract_value_gbp":{"anyOf":[{"type":"integer","maximum":1000000000000000.0,"minimum":0.0},{"type":"null"}],"title":"Annual Contract Value Gbp","description":"3.15, whole pounds"},"risk_assessed_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Risk Assessed On"},"risk_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Outcome"},"risk_commentary":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Risk Commentary"},"audit_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Audit On"},"audit_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audit Outcome"},"financial_dd_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Financial Dd On"},"financial_dd_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Financial Dd Outcome"},"cyber_dd_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Cyber Dd On"},"cyber_dd_outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cyber Dd Outcome"},"compliance_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compliance Status"},"assurance_summary":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Assurance Summary"},"smf_signed_off":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Smf Signed Off"},"governance_committee":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Governance Committee"},"governance_approved_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Governance Approved On"},"substitutability":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Substitutability"},"reintegration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reintegration"},"discontinuation_impact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discontinuation Impact"},"renewal_changes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Renewal Changes","description":"1.07"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes","description":"internal; never exported"}},"additionalProperties":false,"type":"object","title":"EntryPatch"},"ErrorResponse":{"properties":{"error":{"type":"string","title":"Error"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},"type":"object","required":["error"],"title":"ErrorResponse"},"FilingRolesUpdate":{"properties":{"filing_roles":{"items":{"type":"string"},"type":"array","maxItems":30,"title":"Filing Roles","description":"REGIME:role values from GET /filing-readiness/rules; [] clears."}},"type":"object","required":["filing_roles"],"title":"FilingRolesUpdate"},"FirmProfile":{"properties":{"firm_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Firm Name","description":"1.04"},"frn":{"anyOf":[{"type":"string","pattern":"^[0-9]{6}$"},{"type":"null"}],"title":"Frn","description":"1.05"},"group_frn":{"anyOf":[{"type":"string","pattern":"^[0-9]{6}$"},{"type":"null"}],"title":"Group Frn","description":"1.06; leave empty if the firm is the holding company"},"fca_regulated":{"type":"boolean","title":"Fca Regulated","default":true},"pra_regulated":{"type":"boolean","title":"Pra Regulated","default":false},"is_fmi":{"type":"boolean","title":"Is Fmi","default":false}},"additionalProperties":false,"type":"object","title":"FirmProfile"},"FunctionIbs":{"properties":{"function_category":{"type":"string","title":"Function Category","description":"One of the entry's function_categories (3.03)"},"ibs_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Ibs Name","description":"3.05 for this function"},"core_to_ibs":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Core To Ibs","description":"3.06 for this function"}},"additionalProperties":false,"type":"object","required":["function_category"],"title":"FunctionIbs","description":"3.05 / 3.06 for one 3.03 function category (FCA FG26/4 6.9)."},"GapReportRequest":{"properties":{"leis":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Leis","description":"LEIs to screen (max varies by tier)"},"name":{"type":"string","maxLength":80,"title":"Name","description":"Report title","default":"Sanctions Gap Report"},"preparedBy":{"type":"string","maxLength":80,"title":"Preparedby","default":"LEISearch Compliance Support"},"clientName":{"type":"string","maxLength":80,"title":"Clientname","default":""},"reportDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Reportdate","description":"'As of' date for the screening; defaults to today if omitted."}},"type":"object","required":["leis"],"title":"GapReportRequest"},"GoogleSheetsConfigRequest":{"properties":{"spreadsheet_id":{"type":"string","maxLength":200,"minLength":10,"pattern":"^[A-Za-z0-9_-]+$","title":"Spreadsheet Id","description":"Google Sheets spreadsheet ID (from the URL: /spreadsheets/d/{id}/edit)."},"range":{"type":"string","maxLength":200,"title":"Range","description":"A1 notation range containing LEI codes (e.g. 'Sheet1!A:A' or 'LEIs!B2:B1000').","default":"Sheet1!A:A"}},"type":"object","required":["spreadsheet_id"],"title":"GoogleSheetsConfigRequest"},"GoogleSheetsConfigResponse":{"properties":{"spreadsheet_id":{"type":"string","title":"Spreadsheet Id"},"range":{"type":"string","title":"Range"},"message":{"type":"string","title":"Message"}},"type":"object","required":["spreadsheet_id","range","message"],"title":"GoogleSheetsConfigResponse"},"GradeDistribution":{"properties":{"a":{"type":"integer","title":"A"},"b":{"type":"integer","title":"B"},"c":{"type":"integer","title":"C"},"d":{"type":"integer","title":"D"},"worst":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Worst","description":"[{lei, legal_name, score, grade}] lowest first, max 10."}},"type":"object","required":["a","b","c","d"],"title":"GradeDistribution"},"GroupExposureEntry":{"properties":{"ultimateParentLei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ultimateparentlei"},"ultimateParentName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ultimateparentname"},"ultimateParentJurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ultimateparentjurisdiction"},"memberCount":{"type":"integer","title":"Membercount"},"lapsedCount":{"type":"integer","title":"Lapsedcount"},"sanctionedCount":{"type":"integer","title":"Sanctionedcount"},"inactiveCount":{"type":"integer","title":"Inactivecount"},"jurisdictions":{"items":{"type":"string"},"type":"array","title":"Jurisdictions"},"members":{"items":{"$ref":"#/components/schemas/GroupExposureMember"},"type":"array","title":"Members"}},"type":"object","required":["memberCount","lapsedCount","sanctionedCount","inactiveCount","jurisdictions","members"],"title":"GroupExposureEntry"},"GroupExposureMember":{"properties":{"lei":{"type":"string","title":"Lei"},"legalName":{"type":"string","title":"Legalname"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"entityStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitystatus"},"registrationStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrationstatus"},"nextRenewalDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextrenewaldate"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"sanctionsFlag":{"type":"boolean","title":"Sanctionsflag","default":false}},"type":"object","required":["lei","legalName"],"title":"GroupExposureMember"},"GroupExposureResponse":{"properties":{"total":{"type":"integer","title":"Total"},"groups":{"type":"integer","title":"Groups"},"concentrated":{"type":"boolean","title":"Concentrated"},"entries":{"items":{"$ref":"#/components/schemas/GroupExposureEntry"},"type":"array","title":"Entries"}},"type":"object","required":["total","groups","concentrated","entries"],"title":"GroupExposureResponse"},"GroupStructure":{"properties":{"rootLei":{"type":"string","title":"Rootlei"},"rootName":{"type":"string","title":"Rootname"},"rootJurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rootjurisdiction"},"totalMembers":{"type":"integer","title":"Totalmembers"},"directChildCount":{"type":"integer","title":"Directchildcount"},"deeperChildCount":{"type":"integer","title":"Deeperchildcount"},"noParentException":{"anyOf":[{"$ref":"#/components/schemas/ReportingException"},{"type":"null"}]},"directChildren":{"items":{"$ref":"#/components/schemas/RelationshipRecord"},"type":"array","title":"Directchildren","default":[]},"deeperDescendants":{"items":{"$ref":"#/components/schemas/RelationshipRecord"},"type":"array","title":"Deeperdescendants","default":[]},"dataCompleteness":{"type":"string","title":"Datacompleteness","description":"HIGH / MEDIUM / LOW based on corroboration levels"},"goldenCopyDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Goldencopydate"},"truncated":{"type":"boolean","title":"Truncated","description":"True when the walk stopped at its 5,000-row limit (a very large or multiply-connected group): members past it are not listed. Query a subsidiary's own group, or a smaller max_depth, for the rest.","default":false}},"type":"object","required":["rootLei","rootName","totalMembers","directChildCount","deeperChildCount","dataCompleteness"],"title":"GroupStructure"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthScore":{"properties":{"score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Score","description":"Composite 0-100. Higher = healthier record."},"grade":{"type":"string","title":"Grade","description":"A (85+) | B (70-84) | C (50-69) | D (<50)"},"components":{"additionalProperties":true,"type":"object","title":"Components","description":"Per-dimension subscores (each 0-100) and weights."}},"type":"object","required":["score","grade","components"],"title":"HealthScore"},"IctProviderAddResponse":{"properties":{"id":{"type":"string","title":"Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["id","message"],"title":"IctProviderAddResponse"},"IctProviderEntry":{"properties":{"id":{"type":"string","title":"Id"},"provider_name":{"type":"string","title":"Provider Name"},"lei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lei"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"registered_as":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registered As"},"service_type":{"type":"string","title":"Service Type"},"service_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Description"},"criticality":{"type":"string","title":"Criticality"},"contract_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Start"},"contract_end":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract End"},"contract_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Reference"},"notice_period_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Notice Period Days"},"has_subcontractors":{"type":"boolean","title":"Has Subcontractors"},"subcontractor_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subcontractor Note"},"last_audit_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Audit Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"gleif_legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gleif Legal Name"},"gleif_jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gleif Jurisdiction"},"gleif_registration_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gleif Registration Status"},"gleif_entity_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gleif Entity Status"}},"type":"object","required":["id","provider_name","lei","country_code","registered_as","service_type","service_description","criticality","contract_start","contract_end","contract_reference","notice_period_days","has_subcontractors","subcontractor_note","last_audit_date","notes","created_at","updated_at","gleif_legal_name","gleif_jurisdiction","gleif_registration_status","gleif_entity_status"],"title":"IctProviderEntry"},"IctProviderPatch":{"properties":{"provider_name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Provider Name"},"lei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lei"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"registered_as":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registered As"},"service_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Type"},"service_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Service Description"},"criticality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Criticality"},"contract_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Contract Start"},"contract_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Contract End"},"contract_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contract Reference"},"notice_period_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Notice Period Days"},"has_subcontractors":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Subcontractors"},"subcontractor_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subcontractor Note"},"last_audit_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Audit Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"IctProviderPatch","description":"All fields optional — only supplied fields are updated."},"IctProviderRequest":{"properties":{"provider_name":{"type":"string","maxLength":255,"minLength":1,"title":"Provider Name","description":"Legal name of the ICT service provider"},"lei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lei","description":"LEI of the provider (20 chars, if known)"},"country_code":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country Code","description":"ISO 3166-1 alpha-2 country code"},"registered_as":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registered As","description":"Company registration number"},"service_type":{"type":"string","title":"Service Type","description":"Service category: CLOUD | SAAS | DATA | NETWORK | COLOCATION | SOFTWARE | SECURITY | PAYMENTS | ANALYTICS | OTHER"},"service_description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Service Description"},"criticality":{"type":"string","title":"Criticality","description":"CRITICAL | IMPORTANT | STANDARD","default":"STANDARD"},"contract_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Contract Start"},"contract_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Contract End"},"contract_reference":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Contract Reference"},"notice_period_days":{"anyOf":[{"type":"integer","maximum":3650.0,"minimum":0.0},{"type":"null"}],"title":"Notice Period Days"},"has_subcontractors":{"type":"boolean","title":"Has Subcontractors","default":false},"subcontractor_note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Subcontractor Note"},"last_audit_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Audit Date"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["provider_name","service_type"],"title":"IctProviderRequest"},"IctRegisterResponse":{"properties":{"total":{"type":"integer","title":"Total"},"critical":{"type":"integer","title":"Critical"},"important":{"type":"integer","title":"Important"},"standard":{"type":"integer","title":"Standard"},"entries":{"items":{"$ref":"#/components/schemas/IctProviderEntry"},"type":"array","title":"Entries"}},"type":"object","required":["total","critical","important","standard","entries"],"title":"IctRegisterResponse"},"IdentityVerification":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"verified (an identity verification statement is on the appointment) | removed (the statement was removed) | overdue (a statement was due and none is shown) | due (due by a later date) | identity_verified (an ACSP verified the person; no statement on this appointment) | null (nothing to say). Worked out for the day of the check for a historical view, else for today"},"statementSuppliedOn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statementsuppliedon","description":"Statement supplied for the appointment"},"statementRemovedOn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statementremovedon","description":"Statement removed"},"statementFrom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statementfrom","description":"PSC: a statement can be supplied from"},"statementDueOn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Statementdueon","description":"A statement must be supplied by"},"verifiedOn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verifiedon","description":"An authorised corporate service provider (ACSP) verified the person's identity on"},"verifiedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verifiedby","description":"That ACSP's name"},"amlSupervisors":{"items":{"type":"string"},"type":"array","title":"Amlsupervisors","description":"AML supervisory bodies the ACSP was registered with"}},"type":"object","title":"IdentityVerification","description":"Companies House identity verification, as published on the register (Economic\nCrime and Corporate Transparency Act 2023; etl/ch_identity.py)."},"InviteRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email address of the person to invite."},"role":{"type":"string","title":"Role","description":"Role to provision the member with: 'coo', 'analyst', or 'support'. See docs/org-roles.md for what each role can access.","default":"analyst"},"language":{"type":"string","title":"Language","description":"Language of the invitation e-mail and its accept page (en, es, de, fr, zh, pt). Anything else becomes English.","default":"en"}},"type":"object","required":["email"],"title":"InviteRequest"},"InviteResponse":{"properties":{"message":{"type":"string","title":"Message"},"invitee_email":{"type":"string","title":"Invitee Email"},"role":{"type":"string","title":"Role"},"seats_used":{"type":"integer","title":"Seats Used"},"seats_total":{"type":"integer","title":"Seats Total"}},"type":"object","required":["message","invitee_email","role","seats_used","seats_total"],"title":"InviteResponse"},"JurisdictionCountry":{"properties":{"code":{"type":"string","title":"Code"},"count":{"type":"integer","title":"Count"},"entities":{"items":{"$ref":"#/components/schemas/JurisdictionEntity"},"type":"array","title":"Entities"},"highRisk":{"type":"boolean","title":"Highrisk","description":"True for RU, IR, KP and other FATF high-risk / under-increased-monitoring jurisdictions","default":false}},"type":"object","required":["code","count","entities"],"title":"JurisdictionCountry"},"JurisdictionEntity":{"properties":{"lei":{"type":"string","title":"Lei"},"legalName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legalname"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["lei"],"title":"JurisdictionEntity"},"JurisdictionHeatmapResponse":{"properties":{"total":{"type":"integer","title":"Total"},"unknown":{"type":"integer","title":"Unknown"},"countries":{"items":{"$ref":"#/components/schemas/JurisdictionCountry"},"type":"array","title":"Countries"}},"type":"object","required":["total","unknown","countries"],"title":"JurisdictionHeatmapResponse"},"JurisdictionSlice":{"properties":{"country_code":{"type":"string","title":"Country Code"},"entity_count":{"type":"integer","title":"Entity Count"},"pct":{"type":"number","title":"Pct"},"risk_lists":{"items":{"type":"string"},"type":"array","title":"Risk Lists","description":"FATF_BLACK / FATF_GREY / EU_HIGH_RISK / OFAC_COMPREHENSIVE / OFAC_SECTORAL memberships."}},"type":"object","required":["country_code","entity_count","pct"],"title":"JurisdictionSlice"},"LEIHistory":{"properties":{"lei":{"type":"string","title":"Lei"},"totalSnapshots":{"type":"integer","title":"Totalsnapshots","description":"Total number of snapshots available."},"snapshots":{"items":{"$ref":"#/components/schemas/LEISnapshot"},"type":"array","title":"Snapshots"}},"type":"object","required":["lei","totalSnapshots","snapshots"],"title":"LEIHistory","description":"Complete change history for a single LEI, newest snapshot first.\nUse `?at=YYYY-MM-DD` to retrieve the record as of a specific date instead."},"LEIRecord":{"properties":{"lei":{"type":"string","title":"Lei","description":"20-character LEI code"},"legalName":{"type":"string","title":"Legalname","description":"Registered legal name"},"otherNames":{"items":{},"type":"array","title":"Othernames","description":"Previous or alternative names","default":[]},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction","description":"ISO 3166-2 jurisdiction"},"entityStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitystatus","description":"ACTIVE or INACTIVE"},"registrationStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrationstatus","description":"ISSUED, LAPSED, MERGED, etc."},"legalFormId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legalformid","description":"ELF legal form code"},"registeredAs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registeredas","description":"Local company registration number"},"registrationAuthorityId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrationauthorityid"},"managingLou":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Managinglou"},"bic":{"items":{"type":"string"},"type":"array","title":"Bic","description":"SWIFT BIC codes","default":[]},"conformityFlag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conformityflag"},"corroborationLevel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Corroborationlevel"},"initialRegistrationDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Initialregistrationdate"},"lastUpdateDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lastupdatedate"},"nextRenewalDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Nextrenewaldate"},"legalAddress":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Legaladdress"},"headquartersAddress":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Headquartersaddress"},"goldenCopyDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Goldencopydate"}},"type":"object","required":["lei","legalName"],"title":"LEIRecord"},"LEISnapshot":{"properties":{"goldenCopyDate":{"type":"string","format":"date","title":"Goldencopydate","description":"GLEIF golden copy date for this snapshot."},"recordedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recordedat","description":"When LEISearch ingested this snapshot."},"changeFields":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Changefields","description":"Fields that changed from the prior snapshot: entity_status, legal_name, registration_status, managing_lou.  Null for the first-seen snapshot."},"snapshot":{"additionalProperties":true,"type":"object","title":"Snapshot","description":"Full LEI record as of goldenCopyDate."}},"type":"object","required":["goldenCopyDate","snapshot"],"title":"LEISnapshot","description":"A point-in-time record of an LEI as captured from the GLEIF golden copy\non a specific date.  `change_fields` lists which compliance-critical fields\ndiffered from the prior snapshot (null on first capture)."},"LapsedAlertItem":{"properties":{"id":{"type":"string","title":"Id"},"lei":{"type":"string","title":"Lei"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"alerted_status":{"type":"string","title":"Alerted Status"},"alerted_at":{"type":"string","title":"Alerted At","description":"ISO-8601 timestamp"},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved At","description":"ISO-8601 timestamp, or null if still active"},"webhook_fired":{"type":"boolean","title":"Webhook Fired"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"User-assigned portfolio label for this LEI"},"is_active":{"type":"boolean","title":"Is Active","description":"True = alert unresolved (LEI still lapsed)"}},"type":"object","required":["id","lei","alerted_status","alerted_at","webhook_fired","is_active"],"title":"LapsedAlertItem"},"LapsedAlertsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/LapsedAlertItem"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","items"],"title":"LapsedAlertsResponse"},"LastScreenedEntry":{"properties":{"provider":{"type":"string","title":"Provider"},"capability":{"type":"string","title":"Capability"},"matchedName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchedname"},"screenedAt":{"type":"string","title":"Screenedat"},"nextEligibleScreenAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nexteligiblescreenat"},"triggerSource":{"type":"string","title":"Triggersource"},"result":{"type":"string","title":"Result","description":"CLEAR (nothing found) | MATCH"},"matchCount":{"type":"integer","title":"Matchcount"}},"type":"object","required":["provider","capability","matchedName","screenedAt","nextEligibleScreenAt","triggerSource","result","matchCount"],"title":"LastScreenedEntry"},"LegalFormInfo":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Decoded ISO 20275 legal form name"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"decoded":{"type":"boolean","title":"Decoded","description":"False if the ELF code list has not been loaded or code unknown","default":false},"high_risk_form":{"type":"boolean","title":"High Risk Form","description":"True for AML-sensitive structures: foundations, trusts, protected cell companies.","default":false}},"type":"object","title":"LegalFormInfo"},"LeiStatusEntry":{"properties":{"lei":{"type":"string","title":"Lei","description":"LEI code"},"legalName":{"type":"string","title":"Legalname","description":"Entity legal name"},"registrationStatus":{"type":"string","title":"Registrationstatus","description":"GLEIF registration status"},"entityStatus":{"type":"string","title":"Entitystatus","description":"GLEIF entity status (ACTIVE/INACTIVE)"},"isLapsed":{"type":"boolean","title":"Islapsed","description":"True if registration_status = LAPSED"},"isActive":{"type":"boolean","title":"Isactive","description":"True if entity is still operational"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Watchlist label set by user"}},"type":"object","required":["lei","legalName","registrationStatus","entityStatus","isLapsed","isActive"],"title":"LeiStatusEntry"},"MarketFootprint":{"properties":{"has_bic":{"type":"boolean","title":"Has Bic","description":"Entity holds a BIC — proxy for regulated financial institution.","default":false},"bic_count":{"type":"integer","title":"Bic Count","default":0},"has_isin":{"type":"boolean","title":"Has Isin","description":"Entity has issued listed instruments.","default":false},"isin_count":{"type":"integer","title":"Isin Count","default":0},"profile":{"type":"string","title":"Profile","description":"FINANCIAL_INSTITUTION | LISTED_ISSUER | FI_AND_ISSUER | UNLISTED"}},"type":"object","required":["profile"],"title":"MarketFootprint"},"MeResponse":{"properties":{"clientName":{"type":"string","title":"Clientname","description":"Display name for this API key / account"},"tier":{"type":"string","title":"Tier","description":"Raw tier: free | pro | professional | team | enterprise"},"isActive":{"type":"boolean","title":"Isactive","description":"Whether this API key is currently active"},"features":{"$ref":"#/components/schemas/TierFeatures","description":"Feature flags and limits for this tier"}},"type":"object","required":["clientName","tier","isActive","features"],"title":"MeResponse","description":"Authenticated caller's account details. Safe to return to the browser."},"MemberKey":{"properties":{"id":{"type":"string","title":"Id"},"key_prefix":{"type":"string","title":"Key Prefix"},"client_name":{"type":"string","title":"Client Name"},"email":{"type":"string","title":"Email"},"tier":{"type":"string","title":"Tier"},"role":{"type":"string","title":"Role"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Used At"}},"type":"object","required":["id","key_prefix","client_name","email","tier","role","is_active","created_at","last_used_at"],"title":"MemberKey"},"MembersResponse":{"properties":{"seats_used":{"type":"integer","title":"Seats Used"},"seats_total":{"type":"integer","title":"Seats Total"},"members":{"items":{"$ref":"#/components/schemas/MemberKey"},"type":"array","title":"Members"}},"type":"object","required":["seats_used","seats_total","members"],"title":"MembersResponse"},"MonitoringConfigResponse":{"properties":{"lei":{"type":"string","title":"Lei"},"monitorAmlBundle":{"type":"boolean","title":"Monitoramlbundle"},"monitorAdverseMedia":{"type":"boolean","title":"Monitoradversemedia","default":false},"monitorKyb":{"type":"boolean","title":"Monitorkyb"},"amlBundleFrequencyHours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amlbundlefrequencyhours"},"adverseMediaFrequencyHours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Adversemediafrequencyhours"},"kybFrequencyHours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Kybfrequencyhours"},"updatedAt":{"type":"string","title":"Updatedat"},"updatedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedby"},"entitlementNotes":{"items":{"type":"string"},"type":"array","title":"Entitlementnotes","description":"Plain-English notes for any toggle that is ON but not actually entitled under the caller's CURRENT tier -- monitoring stays configured either way, but a capability flagged here will show up in the batch job's not_entitled bucket (zero cost, zero screening) until the account upgrades. Empty list means every ON toggle is fully covered."}},"type":"object","required":["lei","monitorAmlBundle","monitorKyb","amlBundleFrequencyHours","kybFrequencyHours","updatedAt","updatedBy"],"title":"MonitoringConfigResponse"},"MonitoringListEntry":{"properties":{"lei":{"type":"string","title":"Lei"},"monitorAmlBundle":{"type":"boolean","title":"Monitoramlbundle"},"monitorAdverseMedia":{"type":"boolean","title":"Monitoradversemedia","default":false},"monitorKyb":{"type":"boolean","title":"Monitorkyb"},"amlBundleFrequencyHours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amlbundlefrequencyhours"},"adverseMediaFrequencyHours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Adversemediafrequencyhours"},"kybFrequencyHours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Kybfrequencyhours"},"updatedAt":{"type":"string","title":"Updatedat"}},"type":"object","required":["lei","monitorAmlBundle","monitorKyb","updatedAt"],"title":"MonitoringListEntry"},"MonitoringListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"entries":{"items":{"$ref":"#/components/schemas/MonitoringListEntry"},"type":"array","title":"Entries"}},"type":"object","required":["total","entries"],"title":"MonitoringListResponse"},"MonitoringSetRequest":{"properties":{"monitorAmlBundle":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Monitoramlbundle","description":"Sanctions, PEP and official-watchlist ongoing re-screening. (Until 7 Nov 2026 this toggle also covered adverse media; that is now monitorAdverseMedia.) Omit (null) to leave this toggle unchanged -- only send the toggle(s) you actually want to change, this is a partial update, not a full replace."},"monitorAdverseMedia":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Monitoradversemedia","description":"News-based adverse media ongoing re-screening (Team and Enterprise). Omit (null) to leave this toggle unchanged."},"monitorKyb":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Monitorkyb","description":"KYB / UBO ownership monitoring: owners and ownership changes, owners checked against sanctions lists (UK entities today). Off by default. Omit (null) to leave this toggle unchanged."},"amlBundleFrequencyHours":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Amlbundlefrequencyhours","description":"Override how often the AML bundle re-screens THIS entity, in hours (migration 039). Omit (null) to leave any existing override unchanged -- same partial-update semantics as the toggles above. To CLEAR an existing override back to the provider/platform default, this field can't distinguish 'omitted' from 'clear' (both are null) -- use DELETE /monitoring/{lei} and re-POST if you need to explicitly clear an override while keeping the entity monitored."},"kybFrequencyHours":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Kybfrequencyhours"},"adverseMediaFrequencyHours":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Adversemediafrequencyhours"}},"type":"object","title":"MonitoringSetRequest"},"NameScreenRequest":{"properties":{"name":{"type":"string","maxLength":500,"minLength":2,"title":"Name","description":"Entity name to screen"},"lei":{"type":"string","maxLength":20,"title":"Lei","description":"Optional associated LEI","default":""}},"type":"object","required":["name"],"title":"NameScreenRequest"},"NotificationRecord":{"properties":{"kind":{"type":"string","enum":["NEW","CHANGE","RENEWAL"],"title":"Kind"},"submitted_on":{"type":"string","format":"date","title":"Submitted On"},"submission_id":{"type":"integer","maximum":999.0,"minimum":1.0,"title":"Submission Id","default":1}},"additionalProperties":false,"type":"object","required":["kind","submitted_on"],"title":"NotificationRecord"},"OfficerEntry":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role","description":"Companies House officer role, e.g. director, secretary, corporate-director"},"appointedOn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointedon"},"identityVerification":{"anyOf":[{"$ref":"#/components/schemas/IdentityVerification"},{"type":"null"}]}},"type":"object","title":"OfficerEntry"},"OneDriveConfigRequest":{"properties":{"file_path":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"File Path","description":"Path to the Excel file in OneDrive (e.g. 'Documents/entities.xlsx'). Use this OR item_id."},"item_id":{"anyOf":[{"type":"string","maxLength":200,"pattern":"^[A-Za-z0-9!_.-]+$"},{"type":"null"}],"title":"Item Id","description":"OneDrive item ID (from the file's share URL). Use this OR file_path."},"sheet_name":{"type":"string","maxLength":100,"minLength":1,"pattern":"^[^/\\\\?*\\[\\]:']+$","title":"Sheet Name","description":"Worksheet name within the Excel file.","default":"Sheet1"},"range":{"type":"string","maxLength":100,"pattern":"^[A-Za-z0-9:$]+$","title":"Range","description":"Cell range in A1 notation (e.g. 'A:A' or 'B2:B1000').","default":"A:A"}},"type":"object","title":"OneDriveConfigRequest"},"OneDriveConfigResponse":{"properties":{"item_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Item Id"},"file_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Path"},"sheet_name":{"type":"string","title":"Sheet Name"},"range":{"type":"string","title":"Range"},"message":{"type":"string","title":"Message"}},"type":"object","required":["item_id","file_path","sheet_name","range","message"],"title":"OneDriveConfigResponse"},"OwnerChainHop":{"properties":{"childId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Childid","description":"Node id of the company this hop owns or controls: lei:<LEI>, reg:<country>:<number>, or c:/p:<name>"},"childLei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Childlei"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentid"},"parentName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentname"},"parentLei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentlei"},"parentReg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentreg","description":"<country>:<register number> of a company parent"},"parentKind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentkind","description":"company | person"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"companies_house_psc | latvia_ur_shareholder | latvia_ur_bo | czech_vr_shareholder | poland_krs_shareholder | estonia_ar_shareholder | topograph | gleif"},"relation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relation","description":"GLEIF hops: direct | ultimate"},"naturesOfControl":{"items":{"type":"string"},"type":"array","title":"Naturesofcontrol"},"ownershipPct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ownershippct","description":"Register hops: share held"},"sanctionsHits":{"items":{"$ref":"#/components/schemas/OwnerSanctionsHit"},"type":"array","title":"Sanctionshits"}},"type":"object","title":"OwnerChainHop"},"OwnerEntry":{"properties":{"source":{"type":"string","title":"Source","description":"gleif_parent | gleif_exception | companies_house_psc | latvia_ur_bo | latvia_ur_shareholder | czech_vr_shareholder | poland_krs_shareholder | estonia_ar_shareholder | canada_cc_isc | globaldatabase_ubo | globaldatabase_shareholder | topograph_ubo | topograph_shareholder"},"relation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relation","description":"GLEIF: direct | ultimate parent"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"lei":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lei"},"ownershipPct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ownershippct"},"qualifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualifier"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind","description":"Companies House PSC kind"},"naturesOfControl":{"items":{"type":"string"},"type":"array","title":"Naturesofcontrol"},"notifiedOn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notifiedon"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"GLEIF reporting exception reason"},"nationality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nationality","description":"Latvian register: nationality (country code)"},"residence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Residence","description":"Latvian / Czech / Estonian register: country of residence or seat (code)"},"registeredOn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registeredon","description":"Register: date the owner was registered"},"shares":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Shares","description":"Register shareholder: number of shares held, where the register states it"},"registrationNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrationnumber","description":"Register shareholder that is a company: its number in that register (Latvian, Czech IČO, Polish KRS, Estonian registry code; a foreign company's own number)"},"joint":{"type":"boolean","title":"Joint","description":"Estonian register: held jointly with the other owners marked joint (e.g. spouses); each shows the whole stake, never to be added up","default":false},"shareBand":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Shareband","description":"Corporations Canada ISC: the band of shares held, {min, max} in % (e.g. 76-100); the exact figure is not published"},"directPct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Directpct","description":"Global Database UBO: direct ownership %"},"indirectPct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Indirectpct","description":"Global Database UBO: ownership % through holding companies"},"determination":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Determination","description":"Global Database UBO: how it was determined (calculated from shareholder data)"},"paths":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Paths","description":"Global Database UBO: up to 5 ownership routes, each {pct, nodes: [{name, pct, person}]} from the owner down towards the entity (for the ownership map)"},"leiMatchedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leimatchedby","description":"A company owner's LEI was found by its 'registration_number' or by an exact 'name' match to exactly one active LEI in its country"},"chainId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chainid","description":"Node id of this owner in its chain[] hops"},"chain":{"items":{"$ref":"#/components/schemas/OwnerChainHop"},"type":"array","title":"Chain","description":"A company owner: the companies and people above it, walked register first (UK, LV, CZ, PL), GLEIF second (for the ownership map)"},"nameMasked":{"type":"boolean","title":"Namemasked","description":"The register publishes this person's name pseudonymised (Polish KRS open API): shown as published, not sanctions-screened","default":false},"identityVerification":{"anyOf":[{"$ref":"#/components/schemas/IdentityVerification"},{"type":"null"}],"description":"Companies House PSC: identity verification, where Companies House publishes it"},"sanctionsHits":{"items":{"$ref":"#/components/schemas/OwnerSanctionsHit"},"type":"array","title":"Sanctionshits"}},"type":"object","required":["source"],"title":"OwnerEntry"},"OwnerSanctionsHit":{"properties":{"ownerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ownername"},"listName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Listname"},"sanctionedName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sanctionedname"},"matchType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchtype","description":"LEI | NAME_EXACT | NAME_FUZZY"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"}},"type":"object","required":["ownerName","listName","sanctionedName"],"title":"OwnerSanctionsHit"},"OwnershipChange":{"properties":{"kind":{"type":"string","title":"Kind","description":"owner_added | owner_removed | owner_changed | register_relinked | register_status_changed | identity_verification_changed (Companies House, UK; before / after {status}: verified | removed | overdue | due | identity_verified)"},"source":{"type":"string","title":"Source","description":"gleif_parent | gleif_exception | companies_house_psc | companies_house_officer | latvia_ur_bo | latvia_ur_shareholder | czech_vr_shareholder | poland_krs_shareholder | estonia_ar_shareholder | canada_cc_isc | globaldatabase_ubo | globaldatabase_shareholder | topograph_ubo | topograph_shareholder"},"relation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relation","description":"GLEIF: direct | ultimate"},"ownerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ownername"},"before":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Before"},"after":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"After"}},"type":"object","required":["kind","source","ownerName"],"title":"OwnershipChange"},"OwnershipNode":{"properties":{"lei":{"type":"string","title":"Lei"},"legalName":{"type":"string","title":"Legalname"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"relationshipType":{"type":"string","title":"Relationshiptype"},"depth":{"type":"integer","title":"Depth"}},"type":"object","required":["lei","legalName","jurisdiction","relationshipType","depth"],"title":"OwnershipNode"},"OwnershipView":{"properties":{"covered":{"type":"boolean","title":"Covered","description":"KYB / UBO monitoring is available for this entity's jurisdiction"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"checked":{"type":"boolean","title":"Checked","description":"False until the first check (the baseline) has run"},"baselineAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Baselineat"},"checkedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkedat"},"companyNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companynumber"},"companiesHouse":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companieshouse","description":"linked | not_linked (no Companies House company found for this LEI) | not_found (Companies House publishes no PSCs for it) | unavailable (could not be read)"},"pscAsOf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pscasof","description":"When Companies House's PSC list was last read"},"register":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Register","description":"The company register read: companies_house (UK) | lv_ur (Latvian Register of Enterprises) | cz_vr (Czech public register, ARES) | pl_krs (Polish National Court Register) | ee_ar (Estonian e-Business Register) | ca_cc (Corporations Canada, federal)"},"registrationNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrationnumber","description":"The entity's number in that register"},"registerStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registerstatus","description":"linked | not_linked (no register number for this LEI) | not_found | unavailable (could not be read; last owners carried forward)"},"registerAsOf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registerasof","description":"When the register was last read"},"sourceAsOf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sourceasof","description":"The register's own 'data as of' date, where it states one (Czech, Polish)"},"uboSummary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ubosummary","description":"Global Database: chain_complete, ubo_determination_conclusive, percentages_are_minimum"},"uboAsOf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uboasof","description":"Global Database: when the UBOs were last calculated"},"controlStatement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Controlstatement","description":"Corporations Canada: why no individual with significant control is listed -- NO_INDIVIDUALS (no one holds 25% or controls) | PUBLIC_CORP | CROWN_CORP (exempt) | as published"},"owners":{"items":{"$ref":"#/components/schemas/OwnerEntry"},"type":"array","title":"Owners"},"officers":{"items":{"$ref":"#/components/schemas/OfficerEntry"},"type":"array","title":"Officers","description":"UK: the company's current officers at the check, with their Companies House identity verification. Not owners: not compared between checks or screened"},"officersStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Officersstatus","description":"UK: read | carried (could not be read: the last officers seen) | unavailable | not_found | null (not read: checks before 17 Nov 2026, or no Companies House company)"},"discrepancies":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Discrepancies","description":"Where GLEIF and the register disagree at this check (etl/ownership_discrepancy.py): each {kind: gleif_parent_not_on_register | gleif_no_parent_but_register_company_controls, gleif, register[]}. A prompt for review; the PDF note is /ownership/discrepancy-note"},"historical":{"type":"boolean","title":"Historical","description":"True when this is the structure an earlier check saw (`at=`), or the last one kept after monitoring was switched off and on","default":false},"sameSince":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Samesince","description":"Historical view: the first check that saw this structure"},"sameUntil":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sameuntil","description":"Historical view: the last check that still saw it"}},"type":"object","required":["covered","checked"],"title":"OwnershipView"},"PartnerCreditNote":{"properties":{"status":{"type":"string","title":"Status","description":"used | free (the partner did not bill it, e.g. a recent read reused: no credits used, or given back; credits 0 when none were taken) | refunded (the partner failed: credits given back) | confirm (pass partnerCredits >= credits to run it) | no_credits | switched_off | profile_only | on_request | unpriced"},"credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits","description":"Partner credits this check uses."},"balance":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance","description":"Partner credits left."},"scope":{"type":"string","title":"Scope","description":"check (a KYB / UBO check answered by a partner) | beneficial_owners (the beneficial owners a partner adds to an in-house check, e.g. Estonia: the in-house check ran either way; confirm = pass partnerCredits to add them)","default":"check"}},"type":"object","required":["status"],"title":"PartnerCreditNote"},"PartnerCreditPurchase":{"properties":{"product":{"type":"string","title":"Product","description":"pack_10 | pack_50 | pack_200 (monthly) | paygo (one-off)."},"credits":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":1.0},{"type":"null"}],"title":"Credits","description":"paygo only: how many credits (1-500, GBP 12 each)."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"Language of the Stripe page and the return page. Default: the key's language."}},"type":"object","required":["product"],"title":"PartnerCreditPurchase"},"PartnerPartCoverage":{"properties":{"status":{"type":"string","title":"Status","description":"live | coming_soon | on_request"},"credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits","description":"Partner credits the beneficial owners use, per check."}},"type":"object","required":["status"],"title":"PartnerPartCoverage"},"PartnerSwitch":{"properties":{"available":{"type":"boolean","title":"Available","description":"Partner checks are offered at all (false: coming soon)."},"enabled":{"type":"boolean","title":"Enabled","description":"This organisation's switch."},"canChange":{"type":"boolean","title":"Canchange","description":"This key may change the switch (owner, and available)."}},"type":"object","required":["available","enabled","canChange"],"title":"PartnerSwitch"},"PartnerSwitchRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"PartnerSwitchRequest"},"PayeeIn":{"properties":{"name":{"type":"string","maxLength":500,"minLength":1,"title":"Name","description":"The payee's name as the payer has it."},"lei":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Lei","description":"The payee's LEI, if known."},"payee_bic":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Payee Bic","description":"The payee's OWN BIC, for a bank or other financial institution."},"agent_bic":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Agent Bic","description":"The payee's bank's BIC (creditor agent)."},"iban":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Iban","description":"Account IBAN: only its country is used; never stored or returned."},"country":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Country","description":"Account country (ISO 3166 alpha-2)."},"reference":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Reference","description":"Your own row reference, echoed back (bulk)."}},"additionalProperties":false,"type":"object","required":["name"],"title":"PayeeIn"},"PlanAllowance":{"properties":{"tier":{"type":"string","title":"Tier"},"inHouseKybChecksPerMonth":{"type":"integer","title":"Inhousekybcheckspermonth"},"partnerCreditsPerMonth":{"type":"integer","title":"Partnercreditspermonth"}},"type":"object","required":["tier","inHouseKybChecksPerMonth","partnerCreditsPerMonth"],"title":"PlanAllowance"},"PortalResponse":{"properties":{"portal_url":{"type":"string","title":"Portal Url","description":"Stripe Customer Portal URL. Valid for ~5 minutes."}},"type":"object","required":["portal_url"],"title":"PortalResponse"},"PortfolioAnalytics":{"properties":{"portfolio_size":{"type":"integer","title":"Portfolio Size"},"unresolved_leis":{"type":"integer","title":"Unresolved Leis","description":"Portfolio LEIs not found in the local GLEIF store."},"renewal_calendar":{"$ref":"#/components/schemas/RenewalBucket"},"jurisdiction_mix":{"items":{"$ref":"#/components/schemas/JurisdictionSlice"},"type":"array","title":"Jurisdiction Mix"},"transparency_profile":{"$ref":"#/components/schemas/TransparencyProfile"},"grade_distribution":{"$ref":"#/components/schemas/GradeDistribution"},"data_quality":{"$ref":"#/components/schemas/DataQualitySummary"},"sanctions_summary":{"$ref":"#/components/schemas/SanctionsSummary"},"generated_at":{"type":"string","title":"Generated At"}},"type":"object","required":["portfolio_size","unresolved_leis","renewal_calendar","jurisdiction_mix","transparency_profile","grade_distribution","data_quality","sanctions_summary","generated_at"],"title":"PortfolioAnalytics"},"PortfolioScreenRequest":{"properties":{"leis":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Leis","description":"List of LEI codes"}},"type":"object","required":["leis"],"title":"PortfolioScreenRequest"},"PortfolioScreenResponse":{"properties":{"total":{"type":"integer","title":"Total"},"sanctioned":{"type":"integer","title":"Sanctioned"},"indirectExposure":{"type":"integer","title":"Indirectexposure"},"clean":{"type":"integer","title":"Clean"},"results":{"items":{"$ref":"#/components/schemas/ScreenResponse"},"type":"array","title":"Results"}},"type":"object","required":["total","sanctioned","indirectExposure","clean","results"],"title":"PortfolioScreenResponse"},"PortfolioStatusResponse":{"properties":{"total":{"type":"integer","title":"Total","description":"Total LEIs checked"},"lapsed":{"type":"integer","title":"Lapsed","description":"Count of LEIs with LAPSED status"},"inactive":{"type":"integer","title":"Inactive","description":"Count of INACTIVE entities"},"attention_required":{"type":"integer","title":"Attention Required","description":"Count requiring immediate attention (lapsed or inactive)"},"entries":{"items":{"$ref":"#/components/schemas/LeiStatusEntry"},"type":"array","title":"Entries"}},"type":"object","required":["total","lapsed","inactive","attention_required","entries"],"title":"PortfolioStatusResponse"},"ProximityHit":{"properties":{"lei":{"type":"string","title":"Lei"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"relationship":{"type":"string","title":"Relationship","description":"SELF | PARENT | ULTIMATE_PARENT | CHILD | SIBLING"},"list_id":{"type":"string","title":"List Id"},"entry_name":{"type":"string","title":"Entry Name"},"match_type":{"type":"string","title":"Match Type"},"match_score":{"type":"number","title":"Match Score"}},"type":"object","required":["lei","legal_name","relationship","list_id","entry_name","match_type","match_score"],"title":"ProximityHit"},"PublicCoverageResponse":{"properties":{"partnerChecksAvailable":{"type":"boolean","title":"Partnerchecksavailable","description":"Partner checks are offered yet (false: coming soon)."},"plans":{"items":{"$ref":"#/components/schemas/PlanAllowance"},"type":"array","title":"Plans","description":"Each paid plan's monthly in-house KYB checks and partner credits."},"credits":{"$ref":"#/components/schemas/PublicCreditPrices"},"countries":{"items":{"$ref":"#/components/schemas/CountryCoverage"},"type":"array","title":"Countries"}},"type":"object","required":["partnerChecksAvailable","plans","credits","countries"],"title":"PublicCoverageResponse"},"PublicCreditPrices":{"properties":{"packs":{"additionalProperties":{"type":"integer"},"type":"object","title":"Packs","description":"Monthly packs: credits -> GBP per month (VAT on top)."},"paygoCreditGbp":{"type":"integer","title":"Paygocreditgbp"},"paygoValidityDays":{"type":"integer","title":"Paygovaliditydays"}},"type":"object","required":["packs","paygoCreditGbp","paygoValidityDays"],"title":"PublicCreditPrices"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Contact email address."},"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name","description":"Your name or company name."},"ref":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Ref","description":"Optional referral partner code."},"language":{"type":"string","title":"Language","description":"Site language of the sign-up page (en, es, de, fr, zh, pt): the account's e-mails use it. Anything else is treated as en.","default":"en"}},"type":"object","required":["email","name"],"title":"RegisterRequest","description":"Request body for free-tier API key registration."},"RegisterResponse":{"properties":{"apiKey":{"type":"string","title":"Apikey","description":"Your API key. Store it securely — it will not be shown again."},"keyPrefix":{"type":"string","title":"Keyprefix","description":"First 12 characters of the key (safe to display)."},"tier":{"type":"string","title":"Tier","description":"Subscription tier: free.","default":"free"},"message":{"type":"string","title":"Message","description":"Human-readable confirmation."}},"type":"object","required":["apiKey","keyPrefix","message"],"title":"RegisterResponse","description":"Returned once after successful registration. The raw key is not stored — save it now."},"RegistrationHealth":{"properties":{"registration_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Status"},"entity_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Status"},"days_to_renewal":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days To Renewal","description":"Whole days from today (UTC) to the renewal date GLEIF shows; 0 on the day, negative once passed."},"renewal_risk":{"type":"string","title":"Renewal Risk","description":"OK | DUE_SOON (0-30 days) | OVERDUE | LAPSED"},"conformity_flag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conformity Flag"},"corroboration_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Corroboration Level"},"initial_registration_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial Registration Date"},"entity_age_years":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Entity Age Years"}},"type":"object","required":["registration_status","entity_status","days_to_renewal","renewal_risk","conformity_flag","corroboration_level","initial_registration_date","entity_age_years"],"title":"RegistrationHealth"},"RegistryLink":{"properties":{"authority_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority Id"},"authority_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authority Name"},"register_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Register Name"},"registered_as":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registered As","description":"Entity's ID in the national register."},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website","description":"National register website, when GLEIF publishes one."}},"type":"object","title":"RegistryLink"},"RelationshipRecord":{"properties":{"lei":{"type":"string","title":"Lei"},"legalName":{"type":"string","title":"Legalname"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"entityStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitystatus"},"registrationStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrationstatus"},"nextRenewalDate":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Nextrenewaldate"},"depth":{"type":"integer","title":"Depth","description":"Distance from root (0 = root)"},"relationshipType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relationshiptype"}},"type":"object","required":["lei","legalName","depth"],"title":"RelationshipRecord"},"RenewalBucket":{"properties":{"lapsed":{"type":"integer","title":"Lapsed","description":"Registration already LAPSED."},"overdue":{"type":"integer","title":"Overdue","description":"Renewal date passed but not yet marked lapsed."},"due_30d":{"type":"integer","title":"Due 30D","description":"Due in 0-30 days (whole days from today, UTC)."},"due_60d":{"type":"integer","title":"Due 60D","description":"Due in 31-60 days."},"due_90d":{"type":"integer","title":"Due 90D","description":"Due in 61-90 days."},"entities_due_30d":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Entities Due 30D","description":"[{lei, legal_name, next_renewal_date}] — every entity due within 30 days or already past its date, soonest first, max 25. next_renewal_date is the date GLEIF shows (YYYY-MM-DD)."}},"type":"object","required":["lapsed","overdue","due_30d","due_60d","due_90d"],"title":"RenewalBucket"},"RenewalEntry":{"properties":{"lei":{"type":"string","title":"Lei","description":"LEI code"},"legalName":{"type":"string","title":"Legalname","description":"Entity legal name"},"registrationStatus":{"type":"string","title":"Registrationstatus","description":"GLEIF registration status"},"entityStatus":{"type":"string","title":"Entitystatus","description":"GLEIF entity status"},"nextRenewalDate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextrenewaldate","description":"ISO date of next renewal (YYYY-MM-DD)"},"daysUntilRenewal":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daysuntilrenewal","description":"Days until renewal; negative = overdue"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label","description":"Watchlist label set by user"},"filingRoles":{"items":{"type":"string"},"type":"array","title":"Filingroles","description":"Reporting roles set on the entry"},"lapseBlocksFiling":{"items":{"type":"string"},"type":"array","title":"Lapseblocksfiling","description":"The entry's roles that a lapsed LEI can't be used in (a lapse would stop those reports)"}},"type":"object","required":["lei","legalName","registrationStatus","entityStatus"],"title":"RenewalEntry"},"RenewalPartner":{"properties":{"display_name":{"type":"string","title":"Display Name"},"referral_link":{"type":"string","title":"Referral Link","description":"https://leisearch.pro/?ref=<code> -- same format as the operator-facing PartnerReport.referral_link."}},"type":"object","required":["display_name","referral_link"],"title":"RenewalPartner"},"RenewalRadarResponse":{"properties":{"total":{"type":"integer","title":"Total","description":"Total LEIs checked"},"overdue":{"items":{"$ref":"#/components/schemas/RenewalEntry"},"type":"array","title":"Overdue","description":"next_renewal_date is in the past"},"within_30":{"items":{"$ref":"#/components/schemas/RenewalEntry"},"type":"array","title":"Within 30","description":"Renewal due within 0-30 days"},"within_60":{"items":{"$ref":"#/components/schemas/RenewalEntry"},"type":"array","title":"Within 60","description":"Renewal due within 31-60 days"},"within_90":{"items":{"$ref":"#/components/schemas/RenewalEntry"},"type":"array","title":"Within 90","description":"Renewal due within 61-90 days"},"beyond_90":{"items":{"$ref":"#/components/schemas/RenewalEntry"},"type":"array","title":"Beyond 90","description":"Renewal due in more than 90 days"},"no_date":{"items":{"$ref":"#/components/schemas/RenewalEntry"},"type":"array","title":"No Date","description":"No next_renewal_date available in GLEIF data"}},"type":"object","required":["total","overdue","within_30","within_60","within_90","beyond_90","no_date"],"title":"RenewalRadarResponse"},"ReportingException":{"properties":{"exceptionType":{"type":"string","title":"Exceptiontype"},"exceptionReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exceptionreason"},"exceptionReference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exceptionreference"}},"type":"object","required":["exceptionType"],"title":"ReportingException"},"RescreenMatch":{"properties":{"provider":{"type":"string","title":"Provider"},"capability":{"type":"string","title":"Capability"},"matchScore":{"type":"number","title":"Matchscore"},"riskScore":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Riskscore"},"matchedName":{"type":"string","title":"Matchedname"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},"type":"object","required":["provider","capability","matchScore","riskScore","matchedName","category"],"title":"RescreenMatch"},"RescreenResult":{"properties":{"status":{"type":"string","title":"Status"},"capabilitiesRequested":{"items":{"type":"string"},"type":"array","title":"Capabilitiesrequested"},"capabilitiesScreened":{"items":{"type":"string"},"type":"array","title":"Capabilitiesscreened"},"matches":{"items":{"$ref":"#/components/schemas/RescreenMatch"},"type":"array","title":"Matches"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"capabilitiesNotCovered":{"items":{"type":"string"},"type":"array","title":"Capabilitiesnotcovered","description":"Requested checks no provider offers for this entity's jurisdiction yet (e.g. KYB / UBO outside the UK): skipped, nothing charged."},"partnerCredits":{"additionalProperties":{"$ref":"#/components/schemas/PartnerCreditNote"},"type":"object","title":"Partnercredits","description":"Per capability, for checks answered by a partner and paid in partner credits."}},"type":"object","required":["status","capabilitiesRequested","capabilitiesScreened","matches"],"title":"RescreenResult"},"ReverificationResult":{"properties":{"status":{"type":"string","title":"Status","description":"NO_SECOND_PROVIDER (nothing configured to independently verify against -- not an error) | CLEAR (second opinion, no matches) | MATCHES_FOUND"},"provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider","description":"Which vendor produced the second opinion, null for NO_SECOND_PROVIDER"},"matches":{"items":{"$ref":"#/components/schemas/VendorMatch"},"type":"array","title":"Matches"},"explanation":{"type":"string","title":"Explanation"}},"type":"object","required":["status","explanation"],"title":"ReverificationResult","description":"See _cdd_reverify's own docstring for the full design. Unlike\nVendorScreeningSummary, this is a single explicit customer-triggered\naction, not an auxiliary signal bundled into a larger response -- most\nfailure modes here are real HTTP errors (403/404/409/429), not a soft\nstatus field, so `status` only needs to cover outcomes that are\nlegitimately NOT errors."},"RevokeResponse":{"properties":{"id":{"type":"string","title":"Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["id","message"],"title":"RevokeResponse"},"RiskContextResponse":{"properties":{"lei":{"type":"string","title":"Lei"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"transparency":{"$ref":"#/components/schemas/TransparencyBadge"},"sanctions_proximity":{"$ref":"#/components/schemas/SanctionsProximity"},"registration_health":{"$ref":"#/components/schemas/RegistrationHealth"},"jurisdiction_risk":{"$ref":"#/components/schemas/api__routes__risk__JurisdictionRisk"},"legal_form":{"$ref":"#/components/schemas/LegalFormInfo"},"market_footprint":{"$ref":"#/components/schemas/MarketFootprint"},"change_history":{"$ref":"#/components/schemas/ChangeHistory"},"registry_link":{"$ref":"#/components/schemas/RegistryLink"},"health_score":{"$ref":"#/components/schemas/HealthScore"},"data_quality":{"$ref":"#/components/schemas/DataQualitySection"},"adverse_media":{"anyOf":[{"$ref":"#/components/schemas/AdverseMedia"},{"type":"null"}],"description":"None unless this LEI is in a watched portfolio or has been CDD-onboarded -- see AdverseMedia model."},"generated_at":{"type":"string","title":"Generated At"}},"type":"object","required":["lei","legal_name","jurisdiction","transparency","sanctions_proximity","registration_health","jurisdiction_risk","legal_form","market_footprint","change_history","registry_link","health_score","data_quality","generated_at"],"title":"RiskContextResponse"},"RoleUpdateRequest":{"properties":{"role":{"type":"string","title":"Role","description":"New role: 'coo', 'analyst', or 'support'."}},"type":"object","required":["role"],"title":"RoleUpdateRequest"},"RotateSecretResponse":{"properties":{"id":{"type":"string","title":"Id"},"secret":{"type":"string","title":"Secret","description":"New HMAC secret. Returned ONCE. Store it securely."}},"type":"object","required":["id","secret"],"title":"RotateSecretResponse"},"SalesforceConfigRequest":{"properties":{"soql_query":{"type":"string","maxLength":2000,"minLength":10,"title":"Soql Query","description":"SOQL query returning the field that contains LEI codes. Example: SELECT LEI__c FROM Account WHERE LEI__c != NULL LIMIT 2000"},"lei_field":{"type":"string","maxLength":80,"pattern":"^[A-Za-z][A-Za-z0-9_]*$","title":"Lei Field","description":"API name of the field in the SOQL result that holds the LEI value.","default":"LEI__c"}},"type":"object","required":["soql_query"],"title":"SalesforceConfigRequest"},"SalesforceConfigResponse":{"properties":{"soql_query":{"type":"string","title":"Soql Query"},"lei_field":{"type":"string","title":"Lei Field"},"message":{"type":"string","title":"Message"}},"type":"object","required":["soql_query","lei_field","message"],"title":"SalesforceConfigResponse"},"SanctionsHit":{"properties":{"matchType":{"type":"string","title":"Matchtype"},"matchedName":{"type":"string","title":"Matchedname"},"listId":{"type":"string","title":"Listid"},"listName":{"type":"string","title":"Listname"},"programs":{"items":{"type":"string"},"type":"array","title":"Programs"},"sanctionedFrom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sanctionedfrom"},"indirectOwnershipPct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Indirectownershippct"}},"type":"object","required":["matchType","matchedName","listId","listName","programs","sanctionedFrom","indirectOwnershipPct"],"title":"SanctionsHit"},"SanctionsProximity":{"properties":{"status":{"type":"string","title":"Status","description":"CLEAR | DIRECT_HIT | PROXIMITY_HIT"},"relatives_screened":{"type":"integer","title":"Relatives Screened"},"hits":{"items":{"$ref":"#/components/schemas/ProximityHit"},"type":"array","title":"Hits"}},"type":"object","required":["status","relatives_screened","hits"],"title":"SanctionsProximity"},"SanctionsSummary":{"properties":{"entities_with_active_matches":{"type":"integer","title":"Entities With Active Matches"},"total_active_matches":{"type":"integer","title":"Total Active Matches"},"flagged":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Flagged","description":"[{lei, legal_name, match_count, top_list}] max 25."}},"type":"object","required":["entities_with_active_matches","total_active_matches"],"title":"SanctionsSummary"},"ScreenHit":{"properties":{"lei":{"type":"string","title":"Lei"},"legalName":{"type":"string","title":"Legalname"},"matchType":{"type":"string","title":"Matchtype"},"matchScore":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Matchscore"},"matchedName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchedname"},"listId":{"type":"string","title":"Listid"},"listName":{"type":"string","title":"Listname"},"sanctionedEntryId":{"type":"string","title":"Sanctionedentryid"},"sanctionedName":{"type":"string","title":"Sanctionedname"},"programs":{"items":{"type":"string"},"type":"array","title":"Programs","default":[]},"sanctionedFrom":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sanctionedfrom"},"sanctionedTo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sanctionedto"},"indirectOwnershipPct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Indirectownershippct"},"indirectOwnershipPath":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Indirectownershippath"}},"type":"object","required":["lei","legalName","matchType","matchScore","listId","listName","sanctionedEntryId","sanctionedName"],"title":"ScreenHit"},"ScreenResponse":{"properties":{"lei":{"type":"string","title":"Lei"},"legalName":{"type":"string","title":"Legalname"},"screened":{"type":"boolean","title":"Screened","default":true},"isSanctioned":{"type":"boolean","title":"Issanctioned","description":"True if any match_score ≥ 0.95","default":false},"hasIndirectExposure":{"type":"boolean","title":"Hasindirectexposure","description":"True if any INDIRECT_OWNERSHIP hit","default":false},"hits":{"items":{"$ref":"#/components/schemas/ScreenHit"},"type":"array","title":"Hits","default":[]},"totalHits":{"type":"integer","title":"Totalhits","default":0},"listVersions":{"additionalProperties":true,"type":"object","title":"Listversions","description":"Snapshot of list version hashes used for this screen"}},"type":"object","required":["lei","legalName"],"title":"ScreenResponse"},"ScreeningArticle":{"properties":{"headline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Headline"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publishedat"}},"type":"object","required":["headline","url","publishedAt"],"title":"ScreeningArticle"},"ScreeningCapability":{"type":"string","enum":["pep_sanctions","adverse_media","kyb_ownership"],"title":"ScreeningCapability","description":"Every provider declares which of these it supports (see\nComplianceProvider.capabilities). Nothing outside this package branches\non vendor name -- only on capability. Adding a fourth vendor, or a\ncapability none of the three currently in commercial discussion offer,\nis a new enum value plus a new adapter; nothing upstream changes."},"ScreeningHistoryEntry":{"properties":{"provider":{"type":"string","title":"Provider"},"capability":{"type":"string","title":"Capability"},"matchScore":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Matchscore"},"riskScore":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Riskscore"},"matchedName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchedname"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"rawCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rawcategory"},"costUsd":{"type":"number","title":"Costusd"},"screenedAt":{"type":"string","title":"Screenedat"},"nextEligibleScreenAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nexteligiblescreenat"},"triggerSource":{"type":"string","title":"Triggersource"},"dispositionVerdict":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispositionverdict"},"dispositionDecidedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispositiondecidedat"}},"type":"object","required":["provider","capability","matchScore","riskScore","matchedName","category","rawCategory","costUsd","screenedAt","nextEligibleScreenAt","triggerSource","dispositionVerdict","dispositionDecidedAt"],"title":"ScreeningHistoryEntry"},"ScreeningRun":{"properties":{"provider":{"type":"string","title":"Provider"},"capability":{"type":"string","title":"Capability"},"screenedAt":{"type":"string","title":"Screenedat"},"triggerSource":{"type":"string","title":"Triggersource"},"result":{"type":"string","title":"Result","description":"CLEAR (nothing found) | MATCH"},"matches":{"items":{"$ref":"#/components/schemas/ScreeningRunMatch"},"type":"array","title":"Matches"}},"type":"object","required":["provider","capability","screenedAt","triggerSource","result","matches"],"title":"ScreeningRun"},"ScreeningRunMatch":{"properties":{"matchedName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchedname"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"rawCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rawcategory"},"articleCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Articlecount","description":"Adverse media: articles in this category"},"latestArticle":{"anyOf":[{"$ref":"#/components/schemas/ScreeningArticle"},{"type":"null"}],"description":"Adverse media: the newest article"},"ownershipChange":{"anyOf":[{"$ref":"#/components/schemas/OwnershipChange"},{"type":"null"}],"description":"KYB / UBO: what changed"},"ownerSanctionsHit":{"anyOf":[{"$ref":"#/components/schemas/OwnerSanctionsHit"},{"type":"null"}],"description":"KYB / UBO: an owner found on a sanctions list"}},"type":"object","required":["matchedName","category","rawCategory"],"title":"ScreeningRunMatch"},"SearchResponse":{"properties":{"query":{"type":"string","title":"Query"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"},"page":{"type":"integer","title":"Page"},"perPage":{"type":"integer","title":"Perpage"},"results":{"items":{"$ref":"#/components/schemas/SearchResult"},"type":"array","title":"Results"}},"type":"object","required":["query","page","perPage","results"],"title":"SearchResponse"},"SearchResult":{"properties":{"lei":{"type":"string","title":"Lei"},"legalName":{"type":"string","title":"Legalname"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"},"registrationStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrationstatus"},"entityStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entitystatus"},"registeredAs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registeredas"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"}},"type":"object","required":["lei","legalName"],"title":"SearchResult"},"SessionKeyResponse":{"properties":{"api_key":{"type":"string","title":"Api Key","description":"Your LEISearch API key. Store it securely — it will not be shown again."},"key_prefix":{"type":"string","title":"Key Prefix","description":"First 12 characters of the key for display purposes."},"tier":{"type":"string","title":"Tier","default":"pro"},"rate_limit_rpm":{"type":"integer","title":"Rate Limit Rpm","default":600},"batch_size_limit":{"type":"integer","title":"Batch Size Limit","default":1000},"message":{"type":"string","title":"Message","default":"Store this key securely. It cannot be recovered."}},"type":"object","required":["api_key","key_prefix"],"title":"SessionKeyResponse"},"SubscriptionCreate":{"properties":{"lei":{"type":"string","maxLength":20,"minLength":20,"title":"Lei","description":"20-char GLEIF LEI to watch."},"callback_url":{"type":"string","title":"Callback Url","description":"HTTPS URL to receive POST notifications."},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types","description":"Which change types to notify on. Any of: status, name, parent, renewal (reminders 60, 30 and 7 days before the LEI's renewal date, for watchlist LEIs).","default":["status","name","parent"]},"description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Description"}},"type":"object","required":["lei","callback_url"],"title":"SubscriptionCreate"},"SubscriptionResponse":{"properties":{"id":{"type":"string","title":"Id"},"lei":{"type":"string","title":"Lei"},"callback_url":{"type":"string","title":"Callback Url"},"event_types":{"items":{"type":"string"},"type":"array","title":"Event Types"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active"},"last_fired_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Fired At"},"last_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Status"},"fail_count":{"type":"integer","title":"Fail Count"},"created_at":{"type":"string","title":"Created At"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret","description":"Raw HMAC secret. Returned ONCE at creation. Store it securely."}},"type":"object","required":["id","lei","callback_url","event_types","description","is_active","last_fired_at","last_status","fail_count","created_at"],"title":"SubscriptionResponse"},"SyncResponse":{"properties":{"connectorType":{"type":"string","title":"Connectortype"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"}},"type":"object","required":["connectorType","status","message"],"title":"SyncResponse"},"TestFireResponse":{"properties":{"delivery_id":{"type":"string","title":"Delivery Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["delivery_id","message"],"title":"TestFireResponse"},"TierFeatures":{"properties":{"displayName":{"type":"string","title":"Displayname","description":"Human-readable tier name"},"monthlyPrice":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthlyprice","description":"Monthly price in GBP; None = custom pricing"},"currency":{"type":"string","title":"Currency","description":"ISO 4217 currency code"},"dashboardAccess":{"type":"boolean","title":"Dashboardaccess","description":"True if this tier includes UI dashboard access"},"connectorAccess":{"type":"boolean","title":"Connectoraccess","description":"True if this tier includes connector integrations"},"portfolioLimit":{"type":"integer","title":"Portfoliolimit","description":"Max monitored entities (0 = unlimited)"},"userSeats":{"type":"integer","title":"Userseats","description":"Max user seats (0 = unlimited)"},"rateLimitRpm":{"type":"integer","title":"Ratelimitrpm","description":"API requests per minute allowed"},"batchSizeLimit":{"type":"integer","title":"Batchsizelimit","description":"Max entities per batch request"}},"type":"object","required":["displayName","currency","dashboardAccess","connectorAccess","portfolioLimit","userSeats","rateLimitRpm","batchSizeLimit"],"title":"TierFeatures","description":"Feature flags and limits for the caller's subscription tier."},"TransparencyBadge":{"properties":{"badge":{"type":"string","title":"Badge","description":"TRANSPARENT | APEX | EXEMPT | OPAQUE | UNREPORTED"},"direct_parent_reported":{"type":"boolean","title":"Direct Parent Reported"},"ultimate_parent_reported":{"type":"boolean","title":"Ultimate Parent Reported"},"exceptions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Exceptions","description":"Reporting exceptions filed: [{type, reason}]"},"explanation":{"type":"string","title":"Explanation"},"uk_psc_cross_check":{"anyOf":[{"$ref":"#/components/schemas/UkPscCrossCheck"},{"type":"null"}],"description":"UK Companies House PSC cross-check -- only populated for GB-jurisdiction entities. None (not a PENDING status) for every other jurisdiction."},"uk_psc_identity_verification":{"anyOf":[{"$ref":"#/components/schemas/UkPscIdentityVerification"},{"type":"null"}],"description":"UK: Companies House identity verification of the PSCs. None for other jurisdictions, and while it can't be told (no company matched, PSCs not read yet)."}},"type":"object","required":["badge","direct_parent_reported","ultimate_parent_reported","explanation"],"title":"TransparencyBadge"},"TransparencyProfile":{"properties":{"transparent":{"type":"integer","title":"Transparent"},"apex":{"type":"integer","title":"Apex","description":"Group ultimate parents (no parent expected) — widely-held/apex entities.","default":0},"exempt":{"type":"integer","title":"Exempt"},"opaque":{"type":"integer","title":"Opaque"},"unreported":{"type":"integer","title":"Unreported"},"opaque_entities":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Opaque Entities","description":"[{lei, legal_name}] max 25 — EDD candidates."}},"type":"object","required":["transparent","exempt","opaque","unreported"],"title":"TransparencyProfile"},"UkPscCrossCheck":{"properties":{"status":{"type":"string","title":"Status","description":"CONFIRMED | DISCREPANCY | GLEIF_ONLY | PSC_ONLY | NEITHER | UNMATCHED | PENDING"},"company_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Number","description":"Matched Companies House company number, when matched."},"gleif_owner_names":{"items":{"type":"string"},"type":"array","title":"Gleif Owner Names"},"psc_owner_names":{"items":{"type":"string"},"type":"array","title":"Psc Owner Names"},"checked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checked At","description":"When the cross-check was last computed. None for PENDING/UNMATCHED."},"explanation":{"type":"string","title":"Explanation"}},"type":"object","required":["status","explanation"],"title":"UkPscCrossCheck","description":"UK Companies House PSC cross-check (Session 3, migration 036) --\ncross-references GLEIF's self-reported Level 2 ownership against\nCompanies House's statutory PSC register. Only populated for\nGB-jurisdiction entities (non-GB entities get uk_psc_cross_check=None\non the parent TransparencyBadge, not this model with a placeholder\nstatus -- see _uk_psc_cross_check()).\n\nstatus is one of the five real cross-check verdicts (CONFIRMED /\nDISCREPANCY / GLEIF_ONLY / PSC_ONLY / NEITHER, see migration 036) plus\ntwo interim states this route derives live rather than persists:\nPENDING (not yet matched, matched but not yet PSC-fetched, or matched\nand fetched but not yet run through the cross-check computation job)\nand UNMATCHED (no confident Companies House company was found for\nthis entity). DISCREPANCY is the finding a compliance team should look\nat first -- per this feature's own spec, a dashboard should visually\noutrank even OPAQUE with it, since it means both sources DID report an\nowner rather than an absence of data (not enforced by this field's\nshape; a frontend concern for whoever renders it). Note, though, that\nDISCREPANCY is a prompt for human review, not a proven contradiction\n-- see etl/psc_cross_check_job.py's module docstring (\"KNOWN\nLIMITATION\") for why a large share of real DISCREPANCY results turn\nout to be GLEIF's ultimate consolidation parent vs. Companies House's\nnearest relevant legal entity/individual in the same chain, not an\nactual disagreement."},"UkPscIdentityVerification":{"properties":{"status":{"type":"string","title":"Status","description":"UNVERIFIED_PSC (at least one PSC overdue or removed for more than 14 days) | NONE_FLAGGED"},"unverified":{"items":{"$ref":"#/components/schemas/UnverifiedPsc"},"type":"array","title":"Unverified"},"explanation":{"type":"string","title":"Explanation"}},"type":"object","required":["status","explanation"],"title":"UkPscIdentityVerification","description":"Companies House identity verification of the entity's PSCs (Phase 59,\napi/services/uk_identity.py). A flag only: the health score is unchanged."},"UnverifiedPsc":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"type":"string","title":"Status","description":"overdue (a statement was due and none is shown) | removed (the verification statement was removed)"},"since":{"type":"string","title":"Since","description":"The due date (overdue) or removal date (removed)"}},"type":"object","required":["status","since"],"title":"UnverifiedPsc"},"UpdateAccountRequest":{"properties":{"client_name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Client Name","description":"Your name or your organisation's name."},"language":{"anyOf":[{"type":"string","maxLength":35},{"type":"null"}],"title":"Language","description":"Language of your e-mails, digests and Stripe pages: en, es, de, fr, zh or pt (Brazilian Portuguese)."}},"type":"object","title":"UpdateAccountRequest"},"UpdateAccountResponse":{"properties":{"client_name":{"type":"string","title":"Client Name"},"language":{"type":"string","title":"Language"},"email_change":{"type":"string","title":"Email Change"}},"type":"object","required":["client_name","language","email_change"],"title":"UpdateAccountResponse"},"UpgradeRequest":{"properties":{"tier":{"type":"string","maxLength":32,"minLength":1,"title":"Tier","description":"Target tier: 'professional' or 'team'."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"Language of the Stripe page and the return page. Default: the key's language."}},"type":"object","required":["tier"],"title":"UpgradeRequest"},"UpgradeResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url","description":"Stripe-hosted checkout page for the upgrade. Redirect the browser here."}},"type":"object","required":["checkout_url"],"title":"UpgradeResponse"},"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"},"VendorMatch":{"properties":{"provider":{"type":"string","title":"Provider","description":"Vendor that produced this match, e.g. 'opensanctions'"},"capability":{"type":"string","title":"Capability","description":"pep_sanctions | adverse_media | kyb_ownership"},"matchScore":{"type":"number","title":"Matchscore","description":"Identity-match confidence, 0-1"},"riskScore":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Riskscore","description":"Entity/event risk, 0-1, where the vendor provides one separately from match confidence"},"matchedName":{"type":"string","title":"Matchedname"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category","description":"LEISearch-normalized category, best-effort -- see base.py's category-mapping note"},"rawCategory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rawcategory","description":"Vendor's own, unmapped category string"}},"type":"object","required":["provider","capability","matchScore","matchedName"],"title":"VendorMatch","description":"One NormalizedMatch (etl/providers/base.py), reshaped for the public\nAPI. Deliberately a near-1:1 mirror of that dataclass rather than a\nreduced/summarized view -- risk.py's own eventual vendor-match display\n(not built yet) and this endpoint should not each invent their own\npartial projection of the same underlying object. `raw_response` and\n`detail` are NOT included here: those carry the full unmodified vendor\npayload (base.py's \"never destroy the source\" principle) and belong in\ncompliance_provider_screens for audit, not in a per-call API response\nbody that a customer's own logging might persist indefinitely."},"VendorScreeningSummary":{"properties":{"status":{"type":"string","title":"Status","description":"DISABLED (feature flag off) | NOT_CONFIGURED (no active vendor provider for this environment) | NOT_ENTITLED (account tier has no entitlement for any requested capability) | QUOTA_EXCEEDED (monthly quota exhausted) | TECHNICAL_FAILURE (every eligible provider failed technically) | NOT_COVERED (no provider covers this entity's jurisdiction for any requested capability, e.g. KYB / UBO outside the UK) | CLEAR (screened, no matches) | MATCHES_FOUND"},"capabilitiesRequested":{"items":{"type":"string"},"type":"array","title":"Capabilitiesrequested","description":"Capabilities this call asked the orchestrator to screen"},"capabilitiesScreened":{"items":{"type":"string"},"type":"array","title":"Capabilitiesscreened","description":"Subset that actually got a clean ProviderResult back (hit or no-hit)"},"matches":{"items":{"$ref":"#/components/schemas/VendorMatch"},"type":"array","title":"Matches"},"explanation":{"type":"string","title":"Explanation"}},"type":"object","required":["status","capabilitiesRequested","capabilitiesScreened","explanation"],"title":"VendorScreeningSummary","description":"See module docstring's VENDOR SCREENING section for the full design\nrationale. `status` is a SUMMARY of ScreenOutcome's four possible\nper-capability buckets (etl/providers/orchestrator.py) collapsed to one\nvalue for a simple top-line read; when the picture is mixed across the\nthree requested capabilities (e.g. PEP_SANCTIONS screened clean while\nKYB_OWNERSHIP was outside this tier's entitlement), `explanation` spells\nout the real per-capability breakdown -- `status` alone is deliberately\nnot required to capture every nuance a caller needing the full picture\nshould read `capabilitiesRequested` vs `capabilitiesScreened` and the\nexplanation text, not just this one field."},"WatchlistAddResponse":{"properties":{"added":{"type":"integer","title":"Added"},"skipped":{"type":"integer","title":"Skipped"},"total":{"type":"integer","title":"Total"},"message":{"type":"string","title":"Message"}},"type":"object","required":["added","skipped","total","message"],"title":"WatchlistAddResponse"},"WatchlistEntry":{"properties":{"lei":{"type":"string","title":"Lei"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"added_at":{"type":"string","title":"Added At"},"filing_roles":{"items":{"type":"string"},"type":"array","title":"Filing Roles","description":"Reporting roles the LEI is used in (REGIME:role)."}},"type":"object","required":["lei","label","added_at"],"title":"WatchlistEntry"},"WatchlistResponse":{"properties":{"total":{"type":"integer","title":"Total"},"leis":{"items":{"$ref":"#/components/schemas/WatchlistEntry"},"type":"array","title":"Leis"}},"type":"object","required":["total","leis"],"title":"WatchlistResponse"},"WebhookPushRegisterRequest":{"properties":{"label":{"type":"string","maxLength":100,"title":"Label","description":"Human label for this connector"}},"type":"object","required":["label"],"title":"WebhookPushRegisterRequest"},"WebhookPushRegisterResponse":{"properties":{"webhookUrl":{"type":"string","title":"Webhookurl","description":"URL to configure in your source system"},"signingSecret":{"type":"string","title":"Signingsecret","description":"HMAC-SHA256 signing secret for payload verification"}},"type":"object","required":["webhookUrl","signingSecret"],"title":"WebhookPushRegisterResponse"},"api__routes__cdd__JurisdictionRisk":{"properties":{"jurisdiction":{"type":"string","title":"Jurisdiction"},"riskLevel":{"type":"string","title":"Risklevel"},"riskReason":{"type":"string","title":"Riskreason"}},"type":"object","required":["jurisdiction","riskLevel","riskReason"],"title":"JurisdictionRisk"},"api__routes__filing_readiness__BulkIn":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BulkItem"},"type":"array","maxItems":5000,"minItems":1,"title":"Items"},"roles":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":30},{"type":"null"}],"title":"Roles","description":"Roles for every row; omit for all."},"as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of"}},"additionalProperties":false,"type":"object","required":["items"],"title":"BulkIn"},"api__routes__payee__BulkIn":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PayeeIn"},"type":"array","maxItems":500,"minItems":1,"title":"Items"}},"additionalProperties":false,"type":"object","required":["items"],"title":"BulkIn"},"api__routes__risk__JurisdictionRisk":{"properties":{"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code","description":"ISO 3166-1 alpha-2 of entity jurisdiction"},"flags":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Flags","description":"Risk-list memberships: [{list, country_code, country_name, as_of, source, program_name}]. 'list' is FATF_BLACK / FATF_GREY / EU_HIGH_RISK / OFAC_COMPREHENSIVE / OFAC_SECTORAL. program_name is only populated for OFAC_* entries."},"hq_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hq Country"},"legal_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Country"},"address_mismatch":{"type":"boolean","title":"Address Mismatch","description":"True when HQ country differs from legal-address country — shell-structure indicator.","default":false},"ofac_program_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ofac Program Type","description":"COMPREHENSIVE | SECTORAL — set when any screened country carries an active OFAC country sanctions program. Distinct legal basis from the FATF/EU flags: an asset-freeze/embargo regime, not an AML-risk classification."},"ofac_program_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ofac Program Name","description":"OFAC's own program name for the flagged country, e.g. 'Cuba Sanctions'."},"risk_level":{"type":"string","title":"Risk Level","description":"HIGH (FATF black or OFAC comprehensive embargo) | ELEVATED (FATF grey / EU list / OFAC sectoral) | STANDARD"}},"type":"object","required":["risk_level"],"title":"JurisdictionRisk"},"BatchSubmission":{"properties":{"entities":{"description":"List of entities to resolve. Each entry should have at least one of: lei, name, registeredAs, bic.","items":{"additionalProperties":true,"type":"object"},"maxItems":10000,"minItems":1,"title":"Entities","type":"array"},"webhookUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"URL to POST results to when batch completes","title":"Webhookurl"},"includeGroupStructure":{"default":false,"description":"Include full group tree for each resolved entity","title":"Includegroupstructure","type":"boolean"}},"required":["entities"],"title":"BatchSubmission","type":"object"},"WatchlistAddRequest":{"properties":{"leis":{"description":"LEI codes to add to watchlist","items":{"type":"string"},"minItems":1,"title":"Leis","type":"array"},"labels":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"default":null,"description":"Optional map of LEI -> friendly label (e.g. {'ABC...': 'Acme Bank'})","title":"Labels"}},"required":["leis"],"title":"WatchlistAddRequest","type":"object"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Your LEISearchPro API key (lsi_...). Free key: https://leisearch.pro/signup"}}},"servers":[{"url":"https://leisearch-api-n5auomxnkq-ew.a.run.app","description":"Production"}]}