# sancticheck.com Client Integration API Production base URL: https://api.sancticheck.com Local base URL: http://localhost:8000 API version prefix: /api/v1 Documentation: https://app.sancticheck.com/documentation/ OpenAPI: https://api.sancticheck.com/documentation/openapi.json Support: support@sancticheck.com ## Obtain and use a key A signed-in client administrator or platform staff member opens a company, selects API keys, and creates a named key. The secret is shown once. Store it in a server-side secret manager or environment variable. Only its hash is retained by sancticheck.com. Keys act as client administrators for their assigned company, independently of the creator's later user-session state. Revocation, expiry, and company deactivation block subsequent requests. Revocation does not undo completed or in-flight work. Send `Authorization: Bearer ` on every request. API-key requests do not need cookies, a login session, a CSRF token, or an Origin header. Do not embed a key in browser/mobile bundles, URLs, or AI prompts. Give AI the documentation and the name of your environment variable instead. A key cannot access other companies, grant staff access, create/revoke keys, or use staff-only provider administration. Use GET /api/v1/clients to retrieve the assigned client_id. ## Quick start Set SANCTICHECK_API_KEY privately in your environment. These examples perform reads. ```sh curl --fail-with-body https://api.sancticheck.com/api/v1/clients \ -H "Authorization: Bearer $SANCTICHECK_API_KEY" curl --fail-with-body --get https://api.sancticheck.com/api/v1/sanctions/search \ -H "Authorization: Bearer $SANCTICHECK_API_KEY" \ --data-urlencode 'q=abu hud' ``` Python (install httpx): ```python import os import httpx with httpx.Client(base_url="https://api.sancticheck.com", timeout=30, headers={"Authorization": "Bearer " + os.environ["SANCTICHECK_API_KEY"]}) as client: response = client.get("/api/v1/clients", params={"page": 1, "page_size": 20}) response.raise_for_status() company = response.json()["items"][0] print(company["id"], company["name"]) ``` Server-side JavaScript (Node.js with built-in fetch): ```javascript const response = await fetch("https://api.sancticheck.com/api/v1/clients", { headers: { Authorization: `Bearer ${process.env.SANCTICHECK_API_KEY}` } }); if (!response.ok) throw new Error(`Request failed: ${response.status}`); const companies = await response.json(); console.log(companies.items); ``` ## Postman Download integration.zip, import the collection and either production or local environment, select that environment, and set api_key as a local secret value. Fill client_id, group_id, record_id and user_id from the appropriate list responses. Set invite_email only when inviting someone. Optional query parameters are disabled initially; enable those you need. Select individual requests, because create, update, invitation and delete requests change data. Do not run the whole collection against production as a smoke test. Re-import the current package after API upgrades. ## Data conventions and workflows - JSON requests use Content-Type: application/json. IDs are UUID strings. - Paginated responses contain items, total, page, page_size. Pages start at 1; page_size defaults to 20 and is limited to 100. Continue until all items are read. - Client sanctions lookup is different: it returns items, has_more and minimum_characters. It requires 3 letters/numbers, returns at most 10 entries, and requires every case-insensitive whole word, in any order. Punctuation and text edges count as word boundaries; partial names do not match. Names, aliases and identifying data are searchable. Narrow the query if has_more. This API does not perform automated screening or produce a sanctions decision. - Create a group, then POST records to that group's /records URL. Unassigned exists automatically. Group names are trimmed and unique ignoring case. - Portfolio dates use type, precision and value: YEAR "1989", MONTH "1989-02", DAY "1989-02-21", or RANGE with full start/end dates and end_value. Keep dates as strings, not local-time timestamps. Typed identifiers/countries use type and value. - PATCH semantics are endpoint-specific. User updates omit unchanged fields. Group updates require name and replace description (default empty). Record updates require name and replace collections with defaults when omitted. Read a record before editing it and send every field you intend to retain. - Record group_id omitted keeps its group; null selects Unassigned; a UUID moves it to another group within the same company. Use its new group URL after moving. - Deleting a nonempty group requires confirm=true and moves records to Unassigned. Deleting a record archives it. API-key actions in company activity show the key name. - User invitations are queued for delivery, expire after 48 hours and require the recipient to accept them. Resending invalidates the earlier invitation. Client administrators cannot assign staff access or remove the last active administrator. ## Errors and retries Domain errors return {"detail":"message"}. Validation errors (422) return {"detail":[{"loc":["body","field"],"msg":"message","type":"error_type"}]}. Check status codes before parsing success models. 400 means invalid input/business rule; 401 means missing/invalid/expired/revoked key; 403 means forbidden/inactive company; 404 can mean a resource outside your company; 409 means conflict; 422 means schema validation. Invitation/resend requests are limited to 60 per IP and 10 per target email per action per 15-minute window, returning 429 when exceeded. On 429 wait up to 15 minutes. For temporary 5xx/network errors retry reads with bounded exponential backoff. Mutation endpoints do not provide idempotency keys; check current state before retrying an uncertain write. Responses normally include X-Request-ID for support; never log Authorization or expose keys in reports. ## Keeping integrations current This page, the filtered OpenAPI schema, Postman collection and AI-readable reference are generated from the deployed API. One explicit endpoint policy controls both key permissions and public documentation. CI tests verify that all documented operations exist, exported schemas resolve, and key permissions remain company-scoped. New fields and allowed operations appear after deployment. Download fresh packages when updating your integration; saved Postman imports are snapshots. ## Screening classifications Search results and details include `classifications`, a JSON array of source-supported category codes. The OpenAPI schema lists supported codes, including SANCTIONS, PEP, CRIME, NARCOTICS, TERRORISM, financial crime, trafficking, proliferation, human rights, regulatory action and debarment categories. Store the array without flattening it; Excel exports separate tags with a semicolon. The client Screening Search searches all classifications by default. A record can have more than one classification when supported by the source. Use `classification=PEP` to restrict lookup to PEP records. Wikidata supplies PEP information only; a public role does not establish a sanctions designation or wrongdoing. Preserve the supplied role, dates and evidence when displaying results. Records remain separate by source. Missing categories are not a clearance or an assurance that another source has no relevant record. ## Structured report enrichment `GET /api/v1/sanctions/search/{record_id}` includes `enrichment`. It is available through the same client API key permissions as the record details. Staff queue, retry and identity-review operations are not available through client API keys and are not part of this documentation's OpenAPI or Postman collection. Enrichment applies across enabled sanctions providers. Wikidata PEP records are excluded. It does not change source classifications, sanctions evidence or search matching. Names alone do not establish a confirmed identity. Ambiguous identities are held for staff review and are never returned as confirmed report facts. Staff-confirmed identities are reused on refresh while names, entity type, dates, identifiers and locations remain unchanged. Changes to that identity evidence require a fresh identity lookup. The response contains: - `status`: `pending`, `running`, `completed`, `no_match`, `needs_review`, `retry_scheduled`, `failed`, or `not_applicable`. - `outdated`: whether the last available completed result is from an older source revision, has passed its refresh date, or has been superseded by another outcome. - `result`: the last completed result, or null. Store its `id`, `revision_id`, `retrieved_at` and `refresh_after` with the report for traceability. - `result.data`: structured `biodata`, `locations`, `roles`, `relationships`, `identifiers`, `country_profiles`, multilingual `names` and `descriptions`. Each fact retains its property, original value (including date precision), statement ID, rank, qualifiers and references. `reference_labels` resolves available related identities. Unresolved identities remain explicit IDs. - `source_url`, `source_revision`, `retrieved_at` and `license` within the data describe the enrichment provenance. Country profiles carry their own retrieval dates and source versions. Raw `original_entity` is preserved for later analysis. Country connections are typed: citizenship, birthplace, residence, headquarters, formation place and origin country are not interchangeable. A country's context or a relationship does not imply sanctions status. Country profiles are shared through a seven-day cache and copied into the immutable result for reproducibility. Maps, flags, layout and prose belong to the future report generator. No country risk ratings, translations, adverse allegations or recommendations are invented. Continue using the original record's names, dates, identifiers, locations, programs, attributes and `provider_details` as provider evidence. These preserve all supplied designation information, original labels, legal references, narrative and unknown fields. Availability varies by provider; missing fields mean not supplied, not an absence of risk. Listing/removal history remains source-specific. Reports must clearly label pending or outdated background information and separate it from original provider evidence. A no-match enrichment outcome means no suitable background identity was found; it does not clear a sanctions listing. Report rendering and screening decisions are separate features. User list responses include `client_name` alongside `client_id`. Platform accounts without a client have a null client name. Enrichment is published one record at a time and does not require the complete Wikidata PEP dataset. Poll the record detail endpoint while enrichment is pending to display newly completed report information. The worker drains available work continuously, waiting five seconds when idle; temporary failures use retry backoff. ## PDF screening reports Create a report with `POST /api/v1/reports`, using `kind: "profile"` and a source `record_id`, or `kind: "portfolio"`, a portfolio `record_id` and your `client_id`. For a source profile, optional `q` preserves the search name and confidence. The response provides `id`, `reference`, `created_at`, `sha256` and `pdf_url`. Download `pdf_url` with the same Bearer authentication. Do not put the API key in the URL. A busy renderer returns 429; retry shortly. Reports preserve the information and rendered PDF as generated. Later imports, reviews or scoring-rule changes do not alter an earlier report. Generate a new report to include updated information. `GET /api/v1/reports` lists your company's saved reports and supports `record_id`, `page` and `page_size` filters. The PDF includes source attribution, available profile details and, for portfolio reports, screening decisions and meaningful history. Reports begin with the screening notice, executive summary and key facts. Full aliases, detailed source information and supporting lists follow in appendices with numbered references. When configured, AI-assisted commentary summarises the public evidence supplied to the report. It does not change confidence ratings or review decisions. Private client details and review notes are not sent to the AI providers. The selected provider, model, prompt version and evidence fingerprint are retained with the saved narrative. Identical evidence can reuse a saved narrative within the same company; previously generated PDFs remain unchanged. If no provider is available, the factual report is still generated. Provider allowances and operating status are managed by staff and are not part of the client API. ## Endpoint reference ### GET /api/v1/clients/{client_id}/screening/settings Read platform default, nullable company override and effective threshold (1 to 5 stars). Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanySettingsOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### PATCH /api/v1/clients/{client_id}/screening/settings Set company threshold to 1 through 5, or null to inherit the platform default. Queues screening; preserves existing reviews until evidence or customer identity changes. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } } ] ``` Request body: ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanyThreshold" } } } } ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompanySettingsOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### PATCH /api/v1/clients/{client_id}/groups/{group_id}/screening-threshold Set screening_threshold to 1 through 5 or null to inherit the company default. Also supported for Unassigned. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Group Id" } } ] ``` Request body: ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupThreshold" } } } } ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/clients/{client_id}/screening/dashboard Paginated portfolio screening status, counts, latest record check and next scheduled check. Includes failed checks awaiting retry; last_scan_at is latest record activity, not completion of a whole-company cycle. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } }, { "name": "q", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 200, "default": "", "title": "Q" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "ACTION_REQUIRED", "CONFIRMED", "NO_OUTSTANDING", "PENDING" ], "type": "string" }, { "type": "null" } ], "title": "Status" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DashboardOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/clients/{client_id}/screening/records/{record_id} Read current candidates, preserved evidence and recent meaningful history. This view is audited separately and does not create a screening-history entry. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "record_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Record Id" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DetailOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/clients/{client_id}/screening/records/{record_id}/history Paginate immutable screening changes and review decisions for reporting. Routine views and unchanged daily checks are excluded; latest scan timestamps remain available on the screening record. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "record_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Record Id" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_EventOut_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### POST /api/v1/clients/{client_id}/screening/matches/{match_id}/review Save FALSE_POSITIVE, CONFIRMED or NEEDS_REVIEW with notes. Copy version from the latest match detail response; stale versions return 409 and must be refreshed before deciding. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "match_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Match Id" } } ] ``` Request body: ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/app__domain__screening__schemas__Review" } } } } ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/clients/{client_id}/groups/linked-companies List active companies in this client portfolio for the optional linked_to_id field. Supports q and pagination. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "q", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 200, "default": "", "title": "Q" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 100, "title": "Page Size" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_RecordOut_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/clients List the company assigned to this API key. Supports q, page and page_size. Parameters: ```json [ { "name": "q", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 200, "default": "", "title": "Q" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_ClientOut_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/clients/{client_id} Read the assigned company. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClientOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/clients/{client_id}/audit Read company activity. API-key actions include the key name. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_AuditOut_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/users List users in the assigned company. Staff users are excluded. Parameters: ```json [ { "name": "client_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Client Id" } }, { "name": "q", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 200, "default": "", "title": "Q" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_UserOut_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### POST /api/v1/users/invite Invite a user or client administrator to the assigned company. Email is queued; invitations expire after 48 hours. Staff access cannot be granted. Parameters: ```json [] ``` Request body: ```json { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Invite" } } }, "required": true } ``` Responses: ```json { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "429": { "description": "Too many attempts. Wait up to 15 minutes before retrying." } } ``` ### PATCH /api/v1/users/{user_id} Update a company user. Omit unchanged fields. Staff access cannot be granted and the last active client administrator is protected. Parameters: ```json [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "User Id" } } ] ``` Request body: ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserUpdate" } } } } ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### POST /api/v1/users/{user_id}/resend-invitation Replace an unaccepted invitation and queue a new email. The previous link becomes invalid. Parameters: ```json [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "User Id" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "429": { "description": "Too many attempts. Wait up to 15 minutes before retrying." } } ``` ### GET /api/v1/clients/{client_id}/groups List company groups with record_count counting all active records, including linked descendants. Unassigned appears first; remaining groups are ordered by name. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "q", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 200, "default": "", "title": "Q" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_GroupOut_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### POST /api/v1/clients/{client_id}/groups Create a group. Names are trimmed and must be unique within the company, ignoring case. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } } ] ``` Request body: ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupInput" } } } } ``` Responses: ```json { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/clients/{client_id}/groups/{group_id} Read a company group. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Group Id" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### PATCH /api/v1/clients/{client_id}/groups/{group_id} Replace group name and description. The Unassigned group cannot be changed. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Group Id" } } ] ``` Request body: ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupInput" } } } } ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### DELETE /api/v1/clients/{client_id}/groups/{group_id} Archive a group and move its active records to Unassigned. Nonempty groups require confirm=true. Unassigned cannot be deleted. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Group Id" } }, { "name": "confirm", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Confirm" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/clients/{client_id}/groups/{group_id}/records List active portfolio records in a group. Set hierarchy=true to keep linked records beneath their company, paginating whole families. depth and linked_to_name describe the displayed hierarchy. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Group Id" } }, { "name": "q", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 200, "default": "", "title": "Q" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } }, { "name": "hierarchy", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Hierarchy" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_RecordOut_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### POST /api/v1/clients/{client_id}/groups/{group_id}/records Create a portfolio record using a generic name and typed identifying information. Optional linked_to_id must reference an active organisation in the same client; relationship_role describes the link. Cycles are rejected. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Group Id" } } ] ``` Request body: ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecordInput" } } } } ``` Responses: ```json { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecordOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/clients/{client_id}/groups/{group_id}/records/{record_id} Read an active portfolio record. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Group Id" } }, { "name": "record_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Record Id" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecordOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### PATCH /api/v1/clients/{client_id}/groups/{group_id}/records/{record_id} Replace record fields. Supply group_id to move within the same company; null moves to Unassigned, omission keeps the current group. Omitted collection fields reset to their schema defaults. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Group Id" } }, { "name": "record_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Record Id" } } ] ``` Request body: ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecordUpdate" } } } } ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecordOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### DELETE /api/v1/clients/{client_id}/groups/{group_id}/records/{record_id} Archive a portfolio record while preserving its history. Parameters: ```json [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Group Id" } }, { "name": "record_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Record Id" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/sanctions/search Search active full names and aliases using PostgreSQL trigram candidates and the same confidence rules as daily screening. At least 3 letters or numbers, or 2 East Asian characters; at most 10 consolidated profiles. Best full-name similarity ranks first, with primary-name agreement breaking ties. Configured company suffixes are ignored for organisations. Initials, surname-only matches and conflicting generation suffixes are capped below 4 stars. Ratings: 5 for scores at least 97 with exact meaningful-token agreement, 4 at least 90, 3 at least 60, 2 at least 40, otherwise 1. matched_name identifies the source name or alias used. Repeated aliases do not boost confidence. sources lists conservatively linked providers; has_more indicates further candidates. classifications optionally filters candidates. Parameters: ```json [ { "name": "exact", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Exact" } }, { "name": "classification", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "SANCTIONS", "PEP", "CRIME", "NARCOTICS", "TERRORISM", "MONEY_LAUNDERING", "TERRORIST_FINANCING", "PROLIFERATION", "CORRUPTION", "FRAUD", "ORGANISED_CRIME", "HUMAN_TRAFFICKING", "HUMAN_RIGHTS_ABUSES", "CYBERCRIME", "ARMS_TRAFFICKING", "SANCTIONS_EVASION", "REGULATORY_ACTION", "DEBARMENT", "SANCTIONS_LINKED", "SANCTIONS_CONTROL", "COUNTER_SANCTIONS", "RCA", "WANTED", "PERSON_OF_INTEREST", "REGULATORY_WARNING", "EXPORT_CONTROL", "EXPORT_CONTROL_LINKED", "TRADE_RISK", "INVESTMENT_RISK", "INVESTMENT_BAN", "DISQUALIFIED", "FINANCIAL_CRIME", "WAR_CRIMES", "TRAFFICKING", "THEFT", "ENVIRONMENTAL_VIOLATIONS", "FORCED_LABOUR", "FROZEN_ASSET", "MARITIME_DETENTION", "SHADOW_FLEET", "OLIGARCH", "CLONE_ENTITY", "HIGH_RISK_AREA", "SCREENING_INTEREST", "CRIMINAL_LEADERSHIP" ], "type": "string" }, { "type": "null" } ], "title": "Classification" } }, { "name": "q", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 200, "default": "", "title": "Q" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchResults" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/sanctions/search/{record_id} Read a sanctions lookup result, including source, aliases and original provider information. Inactive records and disabled sources return 404. Parameters: ```json [ { "name": "record_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Record Id" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SearchDetail" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/sanctions/search/{record_id}/profile Read a consolidated profile from any member record ID. Optional q supplies the search relevance rating. Includes all active, enabled records linked by shared explicit identifiers or exact full name and full birth date, excluding conflicting evidence. Each record retains its source, classifications and enrichment. Does not merge stored provider evidence. Parameters: ```json [ { "name": "record_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Record Id" } }, { "name": "q", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 200, "default": "", "title": "Q" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScreeningProfile" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### POST /api/v1/reports Queue a detailed PDF screening report for background generation. kind is profile for a consolidated source profile, or portfolio for an authorised company record and its screening history. Portfolio requires client_id. Optional q records the profile search and confidence. Returns 202 while queued or generating, or 200 when reusing a completed report less than 24 hours old. Poll the report metadata for status and download its authenticated PDF URL when ready. Older reports remain available. Parameters: ```json [] ``` Request body: ```json { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReportRequest" } } } } ``` Responses: ```json { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReportOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/reports List report jobs and saved reports within the API key company, optionally filtered by record_id, kind, status or subject name q. Paginated and newest first. Parameters: ```json [ { "name": "client_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Client Id" } }, { "name": "record_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Record Id" } }, { "name": "kind", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "profile", "portfolio" ], "type": "string" }, { "type": "null" } ], "title": "Kind" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "enum": [ "queued", "processing", "ready", "failed" ], "type": "string" }, { "type": "null" } ], "title": "Status" } }, { "name": "for_request", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "For Request" } }, { "name": "q", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 200, "default": "", "title": "Q" } }, { "name": "page", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "default": 1, "title": "Page" } }, { "name": "page_size", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_ReportOut_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/reports/{report_id} Read saved report metadata within the API key company, including the SHA-256 of its PDF. Parameters: ```json [ { "name": "report_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Report Id" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReportOut" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ### GET /api/v1/reports/{report_id}/pdf Download the original saved PDF within the API key company. Authenticate this request as well. Source updates do not change an already generated report. Parameters: ```json [ { "name": "report_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Report Id" } } ] ``` Request body: ```json null ``` Responses: ```json { "200": { "description": "Successful Response", "content": { "application/pdf": { "schema": { "type": "string", "format": "binary" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } }, "400": { "description": "Invalid request or business rule", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "401": { "description": "Missing, invalid, expired or revoked API key", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "403": { "description": "Action not permitted or company inactive", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "404": { "description": "Resource not found within this company", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } }, "409": { "description": "Conflict, duplicate name or protected last administrator", "content": { "application/json": { "schema": { "type": "object", "required": [ "detail" ], "properties": { "detail": { "type": "string" } } } } } } } ``` ## Schemas ```json { "CompanySettingsOut": { "properties": { "threshold": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Threshold" }, "platform_threshold": { "type": "integer", "title": "Platform Threshold" }, "effective_threshold": { "type": "integer", "title": "Effective Threshold" } }, "type": "object", "required": [ "threshold", "platform_threshold", "effective_threshold" ], "title": "CompanySettingsOut" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "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" }, "CompanyThreshold": { "properties": { "threshold": { "anyOf": [ { "type": "integer", "maximum": 5.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Threshold" } }, "additionalProperties": false, "type": "object", "title": "CompanyThreshold" }, "GroupThreshold": { "properties": { "screening_threshold": { "anyOf": [ { "type": "integer", "maximum": 5.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Screening Threshold" } }, "additionalProperties": false, "type": "object", "title": "GroupThreshold" }, "GroupOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "client_id": { "type": "string", "format": "uuid", "title": "Client Id" }, "name": { "type": "string", "title": "Name" }, "description": { "type": "string", "title": "Description" }, "is_default": { "type": "boolean", "title": "Is Default" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "record_count": { "type": "integer", "title": "Record Count" }, "screening_threshold": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Screening Threshold" }, "effective_screening_threshold": { "type": "integer", "title": "Effective Screening Threshold", "default": 4 } }, "type": "object", "required": [ "id", "client_id", "name", "description", "is_default", "created_at", "record_count" ], "title": "GroupOut" }, "DashboardOut": { "properties": { "counts": { "$ref": "#/components/schemas/CountsOut" }, "last_scan_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Scan At" }, "next_scan_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Next Scan At" }, "scan_error_count": { "type": "integer", "title": "Scan Error Count" }, "items": { "items": { "$ref": "#/components/schemas/DashboardRecordOut" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "counts", "last_scan_at", "next_scan_at", "scan_error_count", "items", "total", "page", "page_size" ], "title": "DashboardOut" }, "CountsOut": { "properties": { "action_required": { "type": "integer", "title": "Action Required" }, "confirmed": { "type": "integer", "title": "Confirmed" }, "no_outstanding": { "type": "integer", "title": "No Outstanding" }, "pending": { "type": "integer", "title": "Pending" } }, "type": "object", "required": [ "action_required", "confirmed", "no_outstanding", "pending" ], "title": "CountsOut" }, "DashboardRecordOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "group_id": { "type": "string", "format": "uuid", "title": "Group Id" }, "group_name": { "type": "string", "title": "Group Name" }, "linked_to_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Linked To Name" }, "status": { "type": "string", "title": "Status" }, "last_scanned_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Scanned At" }, "threshold": { "type": "integer", "title": "Threshold" }, "match_count": { "type": "integer", "title": "Match Count" }, "highest_rating": { "type": "integer", "title": "Highest Rating" } }, "type": "object", "required": [ "id", "name", "group_id", "group_name", "linked_to_name", "status", "last_scanned_at", "threshold", "match_count", "highest_rating" ], "title": "DashboardRecordOut" }, "DetailOut": { "properties": { "record": { "$ref": "#/components/schemas/RecordOut" }, "status": { "type": "string", "title": "Status" }, "last_scanned_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Scanned At" }, "next_scan_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Next Scan At" }, "threshold": { "type": "integer", "title": "Threshold" }, "last_error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Error" }, "matches": { "items": { "$ref": "#/components/schemas/MatchOut" }, "type": "array", "title": "Matches" }, "history": { "items": { "$ref": "#/components/schemas/EventOut" }, "type": "array", "title": "History" }, "history_has_more": { "type": "boolean", "title": "History Has More" } }, "type": "object", "required": [ "record", "status", "last_scanned_at", "next_scan_at", "threshold", "last_error", "matches", "history", "history_has_more" ], "title": "DetailOut" }, "RecordOut": { "properties": { "linked_to_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Linked To Id" }, "relationship_role": { "type": "string", "maxLength": 200, "title": "Relationship Role", "default": "" }, "name": { "type": "string", "maxLength": 500, "minLength": 1, "title": "Name" }, "entity_type": { "type": "string", "enum": [ "PERSON", "ORGANISATION", "VESSEL", "UNKNOWN" ], "title": "Entity Type", "default": "PERSON" }, "aliases": { "items": { "type": "string" }, "type": "array", "maxItems": 100, "title": "Aliases" }, "dates": { "items": { "$ref": "#/components/schemas/RecordDate" }, "type": "array", "maxItems": 100, "title": "Dates" }, "identifiers": { "items": { "$ref": "#/components/schemas/TypedValue" }, "type": "array", "maxItems": 100, "title": "Identifiers" }, "countries": { "items": { "$ref": "#/components/schemas/TypedValue" }, "type": "array", "maxItems": 100, "title": "Countries" }, "addresses": { "items": { "type": "string" }, "type": "array", "maxItems": 100, "title": "Addresses" }, "notes": { "type": "string", "maxLength": 10000, "title": "Notes", "default": "" }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "client_id": { "type": "string", "format": "uuid", "title": "Client Id" }, "group_id": { "type": "string", "format": "uuid", "title": "Group Id" }, "normalized_name": { "type": "string", "title": "Normalized Name" }, "linked_to_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Linked To Name" }, "depth": { "type": "integer", "title": "Depth", "default": 0 }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "additionalProperties": false, "type": "object", "required": [ "linked_to_id", "relationship_role", "name", "entity_type", "aliases", "dates", "identifiers", "countries", "addresses", "notes", "id", "client_id", "group_id", "normalized_name", "linked_to_name", "depth", "created_at", "updated_at" ], "title": "RecordOut" }, "RecordDate": { "properties": { "type": { "type": "string", "maxLength": 80, "minLength": 1, "title": "Type" }, "precision": { "type": "string", "enum": [ "DAY", "MONTH", "YEAR", "RANGE" ], "title": "Precision" }, "value": { "type": "string", "maxLength": 10, "title": "Value" }, "end_value": { "anyOf": [ { "type": "string", "maxLength": 10 }, { "type": "null" } ], "title": "End Value" } }, "additionalProperties": false, "type": "object", "required": [ "type", "precision", "value" ], "title": "RecordDate" }, "TypedValue": { "properties": { "type": { "type": "string", "maxLength": 80, "minLength": 1, "title": "Type" }, "value": { "type": "string", "maxLength": 500, "minLength": 1, "title": "Value" } }, "additionalProperties": false, "type": "object", "required": [ "type", "value" ], "title": "TypedValue" }, "MatchOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "sanction_record_id": { "type": "string", "format": "uuid", "title": "Sanction Record Id" }, "name": { "type": "string", "title": "Name" }, "source_name": { "type": "string", "title": "Source Name" }, "classifications": { "items": { "type": "string" }, "type": "array", "title": "Classifications" }, "rating": { "type": "integer", "title": "Rating" }, "active": { "type": "boolean", "title": "Active" }, "decision": { "type": "string", "title": "Decision" }, "evidence": { "additionalProperties": true, "type": "object", "title": "Evidence" }, "first_matched_at": { "type": "string", "format": "date-time", "title": "First Matched At" }, "last_seen_at": { "type": "string", "format": "date-time", "title": "Last Seen At" }, "reviewed_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Reviewed At" }, "review_notes": { "type": "string", "title": "Review Notes" }, "version": { "type": "string", "title": "Version" } }, "type": "object", "required": [ "id", "sanction_record_id", "name", "source_name", "classifications", "rating", "active", "decision", "evidence", "first_matched_at", "last_seen_at", "reviewed_at", "review_notes", "version" ], "title": "MatchOut" }, "EventOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "event_type": { "type": "string", "title": "Event Type" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "details": { "additionalProperties": true, "type": "object", "title": "Details" } }, "type": "object", "required": [ "id", "event_type", "created_at", "details" ], "title": "EventOut" }, "Page_EventOut_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/EventOut" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "items", "total", "page", "page_size" ], "title": "Page[EventOut]" }, "app__domain__screening__schemas__Review": { "properties": { "version": { "type": "string", "maxLength": 64, "minLength": 64, "title": "Version" }, "decision": { "type": "string", "enum": [ "FALSE_POSITIVE", "CONFIRMED", "NEEDS_REVIEW" ], "title": "Decision" }, "notes": { "type": "string", "maxLength": 10000, "title": "Notes", "default": "" } }, "additionalProperties": false, "type": "object", "required": [ "version", "decision" ], "title": "Review" }, "Message": { "properties": { "message": { "type": "string", "title": "Message" } }, "type": "object", "required": [ "message" ], "title": "Message" }, "Page_RecordOut_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/RecordOut" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "items", "total", "page", "page_size" ], "title": "Page[RecordOut]" }, "Page_ClientOut_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ClientOut" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "items", "total", "page", "page_size" ], "title": "Page[ClientOut]" }, "ClientOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "is_active": { "type": "boolean", "title": "Is Active" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "name", "is_active", "created_at" ], "title": "ClientOut" }, "Page_AuditOut_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/AuditOut" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "items", "total", "page", "page_size" ], "title": "Page[AuditOut]" }, "AuditOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "actor_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Actor Id" }, "actor_key_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Actor Key Id" }, "actor_key_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Actor Key Name" }, "actor_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Actor Name" }, "actor_email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Actor Email" }, "client_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Client Id" }, "action": { "type": "string", "title": "Action" }, "target_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Target Id" }, "details": { "additionalProperties": true, "type": "object", "title": "Details" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "actor_id", "actor_key_id", "actor_key_name", "actor_name", "actor_email", "client_id", "action", "target_id", "details", "created_at" ], "title": "AuditOut" }, "Page_UserOut_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/UserOut" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "items", "total", "page", "page_size" ], "title": "Page[UserOut]" }, "UserOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "email": { "type": "string", "title": "Email" }, "name": { "type": "string", "title": "Name" }, "role": { "type": "string", "title": "Role" }, "is_staff": { "type": "boolean", "title": "Is Staff" }, "is_active": { "type": "boolean", "title": "Is Active" }, "client_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Client Id" }, "client_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Client Name" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "invited": { "type": "boolean", "title": "Invited" } }, "type": "object", "required": [ "id", "email", "name", "role", "is_staff", "is_active", "client_id", "created_at", "invited" ], "title": "UserOut" }, "Invite": { "properties": { "email": { "type": "string", "format": "email", "title": "Email" }, "name": { "type": "string", "maxLength": 200, "title": "Name", "default": "" }, "client_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Client Id" }, "role": { "type": "string", "enum": [ "CLIENT_ADMIN", "USER" ], "title": "Role", "default": "USER" }, "is_staff": { "type": "boolean", "title": "Is Staff", "default": false, "const": false } }, "additionalProperties": false, "type": "object", "required": [ "email" ], "title": "Invite" }, "UserUpdate": { "properties": { "name": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ], "title": "Name" }, "role": { "anyOf": [ { "type": "string", "enum": [ "CLIENT_ADMIN", "USER" ] }, { "type": "null" } ], "title": "Role" }, "is_active": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Active" } }, "additionalProperties": false, "type": "object", "title": "UserUpdate" }, "Page_GroupOut_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/GroupOut" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "items", "total", "page", "page_size" ], "title": "Page[GroupOut]" }, "GroupInput": { "properties": { "name": { "type": "string", "maxLength": 200, "minLength": 1, "title": "Name" }, "description": { "type": "string", "maxLength": 2000, "title": "Description", "default": "" } }, "additionalProperties": false, "type": "object", "required": [ "name" ], "title": "GroupInput" }, "RecordInput": { "properties": { "linked_to_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Linked To Id" }, "relationship_role": { "type": "string", "maxLength": 200, "title": "Relationship Role", "default": "" }, "name": { "type": "string", "maxLength": 500, "minLength": 1, "title": "Name" }, "entity_type": { "type": "string", "enum": [ "PERSON", "ORGANISATION", "VESSEL", "UNKNOWN" ], "title": "Entity Type", "default": "PERSON" }, "aliases": { "items": { "type": "string" }, "type": "array", "maxItems": 100, "title": "Aliases" }, "dates": { "items": { "$ref": "#/components/schemas/RecordDate" }, "type": "array", "maxItems": 100, "title": "Dates" }, "identifiers": { "items": { "$ref": "#/components/schemas/TypedValue" }, "type": "array", "maxItems": 100, "title": "Identifiers" }, "countries": { "items": { "$ref": "#/components/schemas/TypedValue" }, "type": "array", "maxItems": 100, "title": "Countries" }, "addresses": { "items": { "type": "string" }, "type": "array", "maxItems": 100, "title": "Addresses" }, "notes": { "type": "string", "maxLength": 10000, "title": "Notes", "default": "" } }, "additionalProperties": false, "type": "object", "required": [ "name" ], "title": "RecordInput" }, "RecordUpdate": { "properties": { "linked_to_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Linked To Id" }, "relationship_role": { "type": "string", "maxLength": 200, "title": "Relationship Role", "default": "" }, "name": { "type": "string", "maxLength": 500, "minLength": 1, "title": "Name" }, "entity_type": { "type": "string", "enum": [ "PERSON", "ORGANISATION", "VESSEL", "UNKNOWN" ], "title": "Entity Type", "default": "PERSON" }, "aliases": { "items": { "type": "string" }, "type": "array", "maxItems": 100, "title": "Aliases" }, "dates": { "items": { "$ref": "#/components/schemas/RecordDate" }, "type": "array", "maxItems": 100, "title": "Dates" }, "identifiers": { "items": { "$ref": "#/components/schemas/TypedValue" }, "type": "array", "maxItems": 100, "title": "Identifiers" }, "countries": { "items": { "$ref": "#/components/schemas/TypedValue" }, "type": "array", "maxItems": 100, "title": "Countries" }, "addresses": { "items": { "type": "string" }, "type": "array", "maxItems": 100, "title": "Addresses" }, "notes": { "type": "string", "maxLength": 10000, "title": "Notes", "default": "" }, "group_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Group Id" } }, "additionalProperties": false, "type": "object", "required": [ "name" ], "title": "RecordUpdate" }, "SearchResults": { "properties": { "complete": { "type": "boolean", "title": "Complete", "default": true }, "items": { "items": { "$ref": "#/components/schemas/SearchResult" }, "type": "array", "title": "Items" }, "has_more": { "type": "boolean", "title": "Has More" }, "minimum_characters": { "type": "integer", "title": "Minimum Characters", "default": 3 } }, "type": "object", "required": [ "items", "has_more" ], "title": "SearchResults" }, "SearchResult": { "properties": { "matched_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Matched Name" }, "match_rating": { "type": "integer", "maximum": 5.0, "minimum": 1.0, "title": "Match Rating" }, "matched_words": { "type": "integer", "title": "Matched Words" }, "sources": { "items": { "$ref": "#/components/schemas/SearchSource" }, "type": "array", "title": "Sources" }, "record_count": { "type": "integer", "title": "Record Count" }, "classifications": { "items": { "type": "string", "enum": [ "SANCTIONS", "PEP", "CRIME", "NARCOTICS", "TERRORISM", "MONEY_LAUNDERING", "TERRORIST_FINANCING", "PROLIFERATION", "CORRUPTION", "FRAUD", "ORGANISED_CRIME", "HUMAN_TRAFFICKING", "HUMAN_RIGHTS_ABUSES", "CYBERCRIME", "ARMS_TRAFFICKING", "SANCTIONS_EVASION", "REGULATORY_ACTION", "DEBARMENT", "SANCTIONS_LINKED", "SANCTIONS_CONTROL", "COUNTER_SANCTIONS", "RCA", "WANTED", "PERSON_OF_INTEREST", "REGULATORY_WARNING", "EXPORT_CONTROL", "EXPORT_CONTROL_LINKED", "TRADE_RISK", "INVESTMENT_RISK", "INVESTMENT_BAN", "DISQUALIFIED", "FINANCIAL_CRIME", "WAR_CRIMES", "TRAFFICKING", "THEFT", "ENVIRONMENTAL_VIOLATIONS", "FORCED_LABOUR", "FROZEN_ASSET", "MARITIME_DETENTION", "SHADOW_FLEET", "OLIGARCH", "CLONE_ENTITY", "HIGH_RISK_AREA", "SCREENING_INTEREST", "CRIMINAL_LEADERSHIP" ] }, "type": "array", "title": "Classifications" }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "entity_type": { "type": "string", "title": "Entity Type" }, "reference_numbers": { "items": { "type": "string" }, "type": "array", "title": "Reference Numbers" }, "source_name": { "type": "string", "title": "Source Name" }, "source_website": { "type": "string", "title": "Source Website" }, "source_last_success_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Source Last Success At" } }, "type": "object", "required": [ "match_rating", "matched_words", "sources", "record_count", "classifications", "id", "name", "entity_type", "reference_numbers", "source_name", "source_website", "source_last_success_at" ], "title": "SearchResult" }, "SearchSource": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "last_success_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Success At" } }, "type": "object", "required": [ "id", "name", "last_success_at" ], "title": "SearchSource" }, "SearchDetail": { "properties": { "classifications": { "items": { "type": "string", "enum": [ "SANCTIONS", "PEP", "CRIME", "NARCOTICS", "TERRORISM", "MONEY_LAUNDERING", "TERRORIST_FINANCING", "PROLIFERATION", "CORRUPTION", "FRAUD", "ORGANISED_CRIME", "HUMAN_TRAFFICKING", "HUMAN_RIGHTS_ABUSES", "CYBERCRIME", "ARMS_TRAFFICKING", "SANCTIONS_EVASION", "REGULATORY_ACTION", "DEBARMENT", "SANCTIONS_LINKED", "SANCTIONS_CONTROL", "COUNTER_SANCTIONS", "RCA", "WANTED", "PERSON_OF_INTEREST", "REGULATORY_WARNING", "EXPORT_CONTROL", "EXPORT_CONTROL_LINKED", "TRADE_RISK", "INVESTMENT_RISK", "INVESTMENT_BAN", "DISQUALIFIED", "FINANCIAL_CRIME", "WAR_CRIMES", "TRAFFICKING", "THEFT", "ENVIRONMENTAL_VIOLATIONS", "FORCED_LABOUR", "FROZEN_ASSET", "MARITIME_DETENTION", "SHADOW_FLEET", "OLIGARCH", "CLONE_ENTITY", "HIGH_RISK_AREA", "SCREENING_INTEREST", "CRIMINAL_LEADERSHIP" ] }, "type": "array", "title": "Classifications" }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "source_id": { "type": "string", "format": "uuid", "title": "Source Id" }, "external_id": { "type": "string", "title": "External Id" }, "name": { "type": "string", "title": "Name" }, "entity_type": { "type": "string", "title": "Entity Type" }, "active": { "type": "boolean", "title": "Active" }, "reference_numbers": { "items": {}, "type": "array", "title": "Reference Numbers" }, "names": { "items": {}, "type": "array", "title": "Names" }, "dates": { "items": {}, "type": "array", "title": "Dates" }, "identifiers": { "items": {}, "type": "array", "title": "Identifiers" }, "locations": { "items": {}, "type": "array", "title": "Locations" }, "programs": { "items": {}, "type": "array", "title": "Programs" }, "attributes": { "additionalProperties": true, "type": "object", "title": "Attributes" }, "snapshot_id": { "type": "string", "format": "uuid", "title": "Snapshot Id" }, "first_seen_at": { "type": "string", "format": "date-time", "title": "First Seen At" }, "last_seen_at": { "type": "string", "format": "date-time", "title": "Last Seen At" }, "last_changed_at": { "type": "string", "format": "date-time", "title": "Last Changed At" }, "enrichment": { "$ref": "#/components/schemas/ReportEnrichment" }, "provider_details": { "additionalProperties": true, "type": "object", "title": "Provider Details" }, "source_name": { "type": "string", "title": "Source Name" }, "source_website": { "type": "string", "title": "Source Website" }, "match_rating": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Match Rating" }, "source_last_success_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Source Last Success At" } }, "type": "object", "required": [ "classifications", "id", "source_id", "external_id", "name", "entity_type", "active", "reference_numbers", "names", "dates", "identifiers", "locations", "programs", "attributes", "snapshot_id", "first_seen_at", "last_seen_at", "last_changed_at", "enrichment", "provider_details", "source_name", "source_website", "source_last_success_at" ], "title": "SearchDetail" }, "ReportEnrichment": { "properties": { "status": { "type": "string", "title": "Status" }, "outdated": { "type": "boolean", "title": "Outdated" }, "result": { "anyOf": [ { "$ref": "#/components/schemas/ReportResult" }, { "type": "null" } ] }, "providers": { "additionalProperties": { "additionalProperties": true, "type": "object" }, "type": "object", "title": "Providers" } }, "type": "object", "required": [ "status", "outdated", "result" ], "title": "ReportEnrichment" }, "ReportResult": { "properties": { "provider": { "type": "string", "title": "Provider", "default": "wikidata" }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "revision_id": { "type": "string", "format": "uuid", "title": "Revision Id" }, "entity_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Entity Id" }, "retrieved_at": { "type": "string", "format": "date-time", "title": "Retrieved At" }, "refresh_after": { "type": "string", "format": "date-time", "title": "Refresh After" }, "data": { "additionalProperties": true, "type": "object", "title": "Data" } }, "type": "object", "required": [ "id", "revision_id", "entity_id", "retrieved_at", "refresh_after", "data" ], "title": "ReportResult" }, "ScreeningProfile": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "classifications": { "items": { "type": "string", "enum": [ "SANCTIONS", "PEP", "CRIME", "NARCOTICS", "TERRORISM", "MONEY_LAUNDERING", "TERRORIST_FINANCING", "PROLIFERATION", "CORRUPTION", "FRAUD", "ORGANISED_CRIME", "HUMAN_TRAFFICKING", "HUMAN_RIGHTS_ABUSES", "CYBERCRIME", "ARMS_TRAFFICKING", "SANCTIONS_EVASION", "REGULATORY_ACTION", "DEBARMENT", "SANCTIONS_LINKED", "SANCTIONS_CONTROL", "COUNTER_SANCTIONS", "RCA", "WANTED", "PERSON_OF_INTEREST", "REGULATORY_WARNING", "EXPORT_CONTROL", "EXPORT_CONTROL_LINKED", "TRADE_RISK", "INVESTMENT_RISK", "INVESTMENT_BAN", "DISQUALIFIED", "FINANCIAL_CRIME", "WAR_CRIMES", "TRAFFICKING", "THEFT", "ENVIRONMENTAL_VIOLATIONS", "FORCED_LABOUR", "FROZEN_ASSET", "MARITIME_DETENTION", "SHADOW_FLEET", "OLIGARCH", "CLONE_ENTITY", "HIGH_RISK_AREA", "SCREENING_INTEREST", "CRIMINAL_LEADERSHIP" ] }, "type": "array", "title": "Classifications" }, "records": { "items": { "$ref": "#/components/schemas/SearchDetail" }, "type": "array", "title": "Records" }, "match_rating": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Match Rating" } }, "type": "object", "required": [ "id", "name", "classifications", "records" ], "title": "ScreeningProfile" }, "ReportRequest": { "properties": { "kind": { "type": "string", "enum": [ "profile", "portfolio" ], "title": "Kind" }, "record_id": { "type": "string", "format": "uuid", "title": "Record Id" }, "client_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Client Id" }, "q": { "type": "string", "maxLength": 200, "title": "Q", "default": "" } }, "additionalProperties": false, "type": "object", "required": [ "kind", "record_id" ], "title": "ReportRequest" }, "ReportOut": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "reference": { "type": "string", "title": "Reference" }, "subject_name": { "type": "string", "title": "Subject Name" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "pdf_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Pdf Url" }, "sha256": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sha256" }, "kind": { "type": "string", "enum": [ "profile", "portfolio" ], "title": "Kind" }, "record_id": { "type": "string", "format": "uuid", "title": "Record Id" }, "client_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Client Id" }, "company_name": { "type": "string", "title": "Company Name" }, "created_by": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Created By" }, "created_by_name": { "type": "string", "title": "Created By Name" }, "generated_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Generated At" }, "status": { "type": "string", "enum": [ "queued", "processing", "ready", "failed" ], "title": "Status" }, "error": { "type": "string", "title": "Error" }, "reusable_until": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Reusable Until" }, "can_regenerate": { "type": "boolean", "title": "Can Regenerate" }, "reused": { "type": "boolean", "title": "Reused", "default": false } }, "type": "object", "required": [ "id", "reference", "subject_name", "created_at", "pdf_url", "sha256", "kind", "record_id", "client_id", "company_name", "created_by", "created_by_name", "generated_at", "status", "error", "reusable_until", "can_regenerate" ], "title": "ReportOut" }, "Page_ReportOut_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ReportOut" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "page": { "type": "integer", "title": "Page" }, "page_size": { "type": "integer", "title": "Page Size" } }, "type": "object", "required": [ "items", "total", "page", "page_size" ], "title": "Page[ReportOut]" } } ```