{
  "openapi": "3.1.0",
  "info": {
    "title": "Kyboa Client API",
    "version": "v1",
    "description": "Account-scoped Kyboa bearer-token API: screenings and saved Markdown reports, supplied Entity creation, Registry API and record discovery."
  },
  "servers": [
    {
      "url": "https://app.kyboa.com",
      "description": "Kyboa production origin"
    }
  ],
  "paths": {
    "/api/v1/auth/context": {
      "get": {
        "operationId": "authContext",
        "description": "Authenticated owning account/spendable exact credit context; one full-access token product.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "200": {
            "description": "Authenticated owning account/spendable exact credit context; one full-access token product.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/screenings": {
      "post": {
        "operationId": "createScreening",
        "description": "Original async quick screening; one whole credit per server-built logical party.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "202": {
            "description": "Original async quick screening; one whole credit per server-built logical party.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "409": {
            "description": "State/conflict/funding/source-result failure; see code table",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        },
        "x-internal-ability": "screenings:create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScreeningCreate"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listScreenings",
        "description": "Tenant-scoped read-only discovery using existing screenings:read check; same full-token product, no new ability/flag/setup/credit gate. Flat QUERY parameters only; GET JSON body ignored. All filters AND, literal q alternatives grouped inside account scope. Optional exact/date filters must be nonblank if present. No private graphs, provider data, report bodies or N+1 result-reader calls. Only completed/degraded screenings have result/report links; report null if absent, latest report by row ID; primary subject is existing oldest-by-ID relation. Historical nulls retained, malformed foreign Entity link hidden as null.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Trimmed UTF-8 literal substring. Blank means no search; 0 is a search. Percent, underscore and ! are literal. Entity primary name OR registration number; Screening snapshotted primary-subject name only. Database collation determines case/accent matching.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Reject invalid/out-of-range values; empty or beyond-last matches return200 empty items.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Reject rather than clamp.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "created_from",
            "in": "query",
            "required": false,
            "description": "Real calendar day in UTC; inclusive start00:00:00. Year0000 and blank invalid.",
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
            }
          },
          {
            "name": "created_to",
            "in": "query",
            "required": false,
            "description": "Inclusive UTC end of day; must be on/after created_from.",
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
            }
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "required": false,
            "description": "Trim then uppercase ISO2 exact filter; Screening primary-subject snapshot, not current Entity.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Optional exact canonical enum.",
            "schema": {
              "type": "string",
              "enum": [
                "individual",
                "company"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "completed_degraded is distinct from completed.",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "running",
                "waiting",
                "completed",
                "completed_degraded",
                "failed"
              ]
            }
          },
          {
            "name": "trigger_type",
            "in": "query",
            "required": false,
            "description": "Omitted includes historical null triggers.",
            "schema": {
              "type": "string",
              "enum": [
                "quick",
                "entity_manual",
                "entity_monitoring"
              ]
            }
          },
          {
            "name": "risk_rating",
            "in": "query",
            "required": false,
            "description": "Unrated values remain null; no inferred Low.",
            "schema": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high",
                "very_high"
              ]
            }
          },
          {
            "name": "entity_id",
            "in": "query",
            "required": false,
            "description": "Resolve within token account; missing and foreign both404 NOT_FOUND; owned empty200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9223372036854775807
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Filtered owned current rows, fixed created_at DESC,id DESC. Empty and beyond-last200; all encoded list responses<=524288bytes. Pagination counts owned filtered set, not a stable export snapshot. Links are app-relative, normalized filters retained; next stops at page10000. No charge or execution.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScreeningDiscovery"
                },
                "examples": {
                  "FindScreenings": {
                    "$ref": "#/components/examples/FindScreenings"
                  }
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED, including revoked/expired/customer-missing/invalid credential.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Existing activation/status/api_user, read ability, global API entitlement or account full lock denial. Grace/Restricted and zero balance permit otherwise authorized reads.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND for missing/foreign entity_id; identical safe response.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "409": {
            "description": "RESULT_DATA_UNAVAILABLE for malformed stored summary metadata; no raw details/fabricated fields.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "413": {
            "description": "RESULT_TOO_LARGE; no partial/truncated items.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "VALIDATION_ERROR for unknown, nested or invalid query filters; no account/user selector, include or caller sort.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED using existing account read throttle, including private no-store errors.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/screenings/{screening}": {
      "get": {
        "operationId": "pollScreening",
        "description": "Original minimal persisted poll; provider-free.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "200": {
            "description": "Original minimal persisted poll; provider-free.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        },
        "x-internal-ability": "screenings:read",
        "parameters": [
          {
            "name": "screening",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/entities/check-existing": {
      "post": {
        "operationId": "checkEntity",
        "description": "Original account-scoped duplicate check; no writes.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "200": {
            "description": "Original account-scoped duplicate check; no writes.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        },
        "x-internal-ability": "entities:read",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EntityCheck"
              }
            }
          }
        }
      }
    },
    "/api/v1/entities": {
      "post": {
        "operationId": "createEntity",
        "description": "Supplied rich or original minimal creation via shared writer/all-child transaction/version1. No registry/fee/automatic screening.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "201": {
            "description": "Supplied rich or original minimal creation via shared writer/all-child transaction/version1. No registry/fee/automatic screening.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                },
                "examples": {
                  "nested": {
                    "$ref": "#/components/examples/NestedEntity422"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "409": {
            "description": "State/conflict/funding/source-result failure; see code table",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        },
        "x-internal-ability": "entities:create",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EntityCreate"
              },
              "examples": {
                "RichEntityRequest": {
                  "$ref": "#/components/examples/RichEntityRequest"
                }
              }
            }
          },
          "x-max-bytes": 262144
        }
      },
      "get": {
        "operationId": "listEntities",
        "description": "Tenant-scoped read-only discovery using existing entities:read check; same full-token product, no new ability/flag/setup/credit gate. Flat QUERY parameters only; GET JSON body ignored. All filters AND, literal q alternatives grouped inside account scope. Optional exact/date filters must be nonblank if present. No private graphs, provider data, report bodies or N+1 result-reader calls. Only completed/degraded screenings have result/report links; report null if absent, latest report by row ID; primary subject is existing oldest-by-ID relation. Historical nulls retained, malformed foreign Entity link hidden as null.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Trimmed UTF-8 literal substring. Blank means no search; 0 is a search. Percent, underscore and ! are literal. Entity primary name OR registration number; Screening snapshotted primary-subject name only. Database collation determines case/accent matching.",
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Reject invalid/out-of-range values; empty or beyond-last matches return200 empty items.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Reject rather than clamp.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "created_from",
            "in": "query",
            "required": false,
            "description": "Real calendar day in UTC; inclusive start00:00:00. Year0000 and blank invalid.",
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
            }
          },
          {
            "name": "created_to",
            "in": "query",
            "required": false,
            "description": "Inclusive UTC end of day; must be on/after created_from.",
            "schema": {
              "type": "string",
              "format": "date",
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
            }
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "required": false,
            "description": "Trim then uppercase ISO2 exact filter; Screening primary-subject snapshot, not current Entity.",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z]{2}$"
            }
          },
          {
            "name": "entity_type",
            "in": "query",
            "required": false,
            "description": "Optional exact canonical enum.",
            "schema": {
              "type": "string",
              "enum": [
                "company",
                "individual"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Omitted includes all statuses including archived; no all value.",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "paused",
                "archived"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Filtered owned current rows, fixed created_at DESC,id DESC. Empty and beyond-last200; all encoded list responses<=524288bytes. Pagination counts owned filtered set, not a stable export snapshot. Links are app-relative, normalized filters retained; next stops at page10000. No charge or execution.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityDiscovery"
                },
                "examples": {
                  "FindEntities": {
                    "$ref": "#/components/examples/FindEntities"
                  }
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED, including revoked/expired/customer-missing/invalid credential.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Existing activation/status/api_user, read ability, global API entitlement or account full lock denial. Grace/Restricted and zero balance permit otherwise authorized reads.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "409": {
            "description": "RESULT_DATA_UNAVAILABLE for malformed stored summary metadata; no raw details/fabricated fields.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "413": {
            "description": "RESULT_TOO_LARGE; no partial/truncated items.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "VALIDATION_ERROR for unknown, nested or invalid query filters; no account/user selector, include or caller sort.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED using existing account read throttle, including private no-store errors.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store, private"
                }
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/entities/{entity}": {
      "get": {
        "operationId": "entityDetail",
        "description": "Owning account current Entity detail; read shape is not input authorization.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "200": {
            "description": "Owning account current Entity detail; read shape is not input authorization.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        },
        "x-internal-ability": "entities:read",
        "parameters": [
          {
            "name": "entity",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/entities/{entity}/screenings": {
      "post": {
        "operationId": "screenEntity",
        "description": "Explicit separate ordinary logical-party screening; aliases/multiple roles do not add parties.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "202": {
            "description": "Explicit separate ordinary logical-party screening; aliases/multiple roles do not add parties.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "409": {
            "description": "State/conflict/funding/source-result failure; see code table",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        },
        "x-internal-ability": "screenings:create",
        "parameters": [
          {
            "name": "entity",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      },
      "get": {
        "operationId": "entityScreeningHistory",
        "description": "Owning account compact Entity screening history.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "200": {
            "description": "Owning account compact Entity screening history.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        },
        "x-internal-ability": "screenings:read",
        "parameters": [
          {
            "name": "entity",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ]
      }
    },
    "/api/v1/screenings/{screening}/result": {
      "get": {
        "operationId": "completedResult",
        "description": "Completed/degraded stored summary <=64KiB; no providers, money, raw artifacts or inferred risk.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "200": {
            "description": "Completed/degraded stored summary <=64KiB; no providers, money, raw artifacts or inferred risk.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CompletedResult"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "406": {
            "description": "Stored evidence JSON format unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "409": {
            "description": "State/conflict/funding/source-result failure; see code table",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "413": {
            "description": "Request/result exceeds bound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        },
        "x-internal-ability": "screenings:read",
        "parameters": [
          {
            "name": "screening",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "x-max-response-bytes": 65536
      }
    },
    "/api/v1/screenings/{screening}/reports/{report}": {
      "get": {
        "operationId": "storedReport",
        "description": "Exact saved Markdown and hash/version through tenant-owned Screening relation; JSON only. PDF deferred.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "200": {
            "description": "Exact saved Markdown and hash/version through tenant-owned Screening relation; JSON only. PDF deferred.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StoredReport"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "stored": {
                    "$ref": "#/components/examples/StoredReport"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "406": {
            "description": "Stored evidence JSON format unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "409": {
            "description": "State/conflict/funding/source-result failure; see code table",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "413": {
            "description": "Request/result exceeds bound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        },
        "x-internal-ability": "screenings:read",
        "parameters": [
          {
            "name": "screening",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "report",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "x-max-response-bytes": 4194304
      }
    },
    "/api/v1/registry/sources": {
      "get": {
        "operationId": "paidSources",
        "description": "Default-off separately metered source discovery; no provider call. Hard source exclusions apply.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default-off separately metered source discovery; no provider call. Hard source exclusions apply.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "503": {
            "description": "Default-off/source/readiness/queue/proof/storage unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        },
        "x-internal-ability": "registry:read"
      }
    },
    "/api/v1/registry/searches": {
      "post": {
        "operationId": "paidSearch",
        "description": "Queued one bounded operation, initially250S. New cached/no-match access is priced; failure/incomplete/invalid/throttled uncharged. Frozen quote A, independently configurable future source/search/lookup prices. Same key replay200 or202; no refetch/recharge.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "202": {
            "description": "Queued one bounded operation, initially250S. New cached/no-match access is priced; failure/incomplete/invalid/throttled uncharged. Frozen quote A, independently configurable future source/search/lookup prices. Same key replay200 or202; no refetch/recharge.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RegistryOperation"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "200": {
            "description": "Saved terminal receipt, including same-key replay or worker completion before HTTP response; no second charge.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RegistryOperation"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "State/conflict/funding/source-result failure; see code table",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "410": {
            "description": "Expired stored payload/selector; never implicit refetch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "413": {
            "description": "Request/result exceeds bound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "503": {
            "description": "Default-off/source/readiness/queue/proof/storage unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        },
        "x-internal-ability": "registry:search",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaidSearch"
              },
              "examples": {
                "PaidSearchRequest": {
                  "$ref": "#/components/examples/PaidSearchRequest"
                }
              }
            }
          },
          "x-max-bytes": 16384
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]{16,128}$"
            },
            "description": "Account-scoped immutable request identity; same canonical body replays, conflict409. Never mint a new key for a transport retry."
          }
        ]
      }
    },
    "/api/v1/registry/lookups": {
      "post": {
        "operationId": "paidLookup",
        "description": "Queued one bounded operation, initially250S. New cached/no-match access is priced; failure/incomplete/invalid/throttled uncharged. Frozen quote A, independently configurable future source/search/lookup prices. Same key replay200 or202; no refetch/recharge.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "202": {
            "description": "Queued one bounded operation, initially250S. New cached/no-match access is priced; failure/incomplete/invalid/throttled uncharged. Frozen quote A, independently configurable future source/search/lookup prices. Same key replay200 or202; no refetch/recharge.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RegistryOperation"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "200": {
            "description": "Saved terminal receipt, including same-key replay or worker completion before HTTP response; no second charge.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RegistryOperation"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "State/conflict/funding/source-result failure; see code table",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                },
                "examples": {
                  "InsufficientFraction": {
                    "$ref": "#/components/examples/InsufficientFraction"
                  },
                  "CanonicalConflict": {
                    "$ref": "#/components/examples/CanonicalConflict"
                  }
                }
              }
            }
          },
          "410": {
            "description": "Expired stored payload/selector; never implicit refetch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "413": {
            "description": "Request/result exceeds bound",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "503": {
            "description": "Default-off/source/readiness/queue/proof/storage unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        },
        "x-internal-ability": "registry:lookup",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaidLookup"
              },
              "examples": {
                "PaidLookupRequest": {
                  "$ref": "#/components/examples/PaidLookupRequest"
                }
              }
            }
          },
          "x-max-bytes": 16384
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 16,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]{16,128}$"
            },
            "description": "Account-scoped immutable request identity; same canonical body replays, conflict409. Never mint a new key for a transport retry."
          }
        ]
      }
    },
    "/api/v1/registry/operations/{operation}": {
      "get": {
        "operationId": "paidStatus",
        "description": "Free receipt/status. Retain immutable operation/idempotency/ledger evidence for account lifetime; no source work.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "200": {
            "description": "Free receipt/status. Retain immutable operation/idempotency/ledger evidence for account lifetime; no source work.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RegistryOperation"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "CompletedNoMatchReceipt": {
                    "$ref": "#/components/examples/CompletedNoMatchReceipt"
                  },
                  "FailureCurrentEpoch": {
                    "$ref": "#/components/examples/FailureCurrentEpoch"
                  },
                  "FailureIneligibleEpoch": {
                    "$ref": "#/components/examples/FailureIneligibleEpoch"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "503": {
            "description": "Default-off/source/readiness/queue/proof/storage unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        },
        "x-internal-ability": "registry:read",
        "parameters": [
          {
            "name": "operation",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/api/v1/registry/operations/{operation}/result": {
      "get": {
        "operationId": "paidStoredResult",
        "description": "Free stored completed result plus exact charge receipt. Payload30 days from terminal;410 retains original receipt. Never implicit provider refetch.",
        "security": [
          {
            "CustomerFull": []
          }
        ],
        "responses": {
          "200": {
            "description": "Free stored completed result plus exact charge receipt. Payload30 days from terminal;410 retains original receipt. Never implicit provider refetch.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RegistryStoredResult"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/CustomerMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                },
                "examples": {
                  "noMatch": {
                    "$ref": "#/components/examples/SavedNoMatchResult"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid/missing/revoked credential",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "403": {
            "description": "Role/account/lifecycle/ability denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "404": {
            "description": "Missing or cross-owner resource/handle",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "422": {
            "description": "Strict input validation; indexed safe errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "429": {
            "description": "Bounded rate/inflight limit; Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "500": {
            "description": "Safe generic server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "409": {
            "description": "State/conflict/funding/source-result failure; see code table",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          },
          "410": {
            "description": "Expired stored payload/selector; never implicit refetch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                },
                "examples": {
                  "expired": {
                    "$ref": "#/components/examples/ExpiredPaidPayload"
                  }
                }
              }
            }
          },
          "503": {
            "description": "Default-off/source/readiness/queue/proof/storage unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomerError"
                }
              }
            }
          }
        },
        "x-internal-ability": "registry:read",
        "parameters": [
          {
            "name": "operation",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CustomerError": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorBody"
          },
          "meta": {
            "$ref": "#/components/schemas/CustomerMeta"
          }
        },
        "required": [
          "error",
          "meta"
        ],
        "additionalProperties": false
      },
      "CustomerMeta": {
        "type": "object",
        "properties": {
          "api_version": {
            "const": "v1"
          },
          "request_id": {
            "type": "string",
            "maxLength": 128
          },
          "credit_representation": {
            "const": "kyboa_decimal_v1"
          },
          "credit_scale": {
            "const": 1000
          }
        },
        "required": [
          "api_version",
          "request_id",
          "credit_representation",
          "credit_scale"
        ],
        "additionalProperties": false
      },
      "ErrorBody": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "details": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "code",
          "message",
          "details"
        ],
        "additionalProperties": false
      },
      "RegistryStoredResult": {
        "type": "object",
        "properties": {
          "operation_id": {
            "type": "string",
            "format": "uuid"
          },
          "provider_id": {
            "type": "string"
          },
          "source_id": {
            "type": "string",
            "enum": [
              "KH",
              "TH",
              "LA",
              "JP",
              "TW",
              "HK",
              "SGACRA"
            ]
          },
          "operation": {
            "type": "string",
            "enum": [
              "search",
              "lookup"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "result_ready",
              "completed",
              "failed",
              "incomplete"
            ]
          },
          "outcome": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "completed_match",
                  "completed_no_match",
                  "failed",
                  "incomplete"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "accepted_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{6}Z$"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{6}Z$"
              },
              {
                "type": "null"
              }
            ]
          },
          "result_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "tariff_version": {
            "type": "string",
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
            "description": "Frozen accepted tariff schedule label, independently versioned from operation-proof schema v1 and ledger credit proof v2; not required to equal current config."
          },
          "credit_quantity_unit": {
            "const": "kyboa_subunit_v1"
          },
          "charge": {
            "$ref": "#/components/schemas/RegistryCharge"
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "result": {
                "type": "string"
              }
            },
            "required": [
              "self",
              "result"
            ],
            "additionalProperties": false
          },
          "result": {
            "$ref": "#/components/schemas/RegistryResult"
          }
        },
        "required": [
          "operation_id",
          "provider_id",
          "source_id",
          "operation",
          "state",
          "outcome",
          "error_code",
          "accepted_at",
          "completed_at",
          "result_expires_at",
          "tariff_version",
          "credit_quantity_unit",
          "charge",
          "links",
          "result"
        ],
        "additionalProperties": false
      },
      "RegistryResult": {
        "type": "object",
        "properties": {
          "company": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Company"
              },
              {
                "type": "null"
              }
            ]
          },
          "matches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Company"
            },
            "maxItems": 20
          },
          "people": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "maxItems": 100
          },
          "shareholders": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "maxItems": 100
          },
          "provenance": {
            "$ref": "#/components/schemas/Provenance"
          },
          "coverage": {
            "type": "object"
          },
          "pagination": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "required": [
          "company",
          "matches",
          "provenance"
        ],
        "additionalProperties": false,
        "description": "Approved bounded projection from an original source envelope <=524288 encoded bytes, transport body<=2097152 bytes (stricter source/ACRA bounds retained). Route adds bounded selectors and receipt metadata;512KiB is not claimed as a final HTTP response cap. Previous names20, activities20, separately approved people/shareholders100. Missing/malformed required source names fail safely; genuine supplied numeric names valid. No raw provider serialization.",
        "x-max-stored-source-envelope-bytes": 524288
      },
      "Provenance": {
        "type": "object",
        "properties": {
          "source_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "jurisdiction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "capability": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_record_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_terms_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "retrieved_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "served_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_data_as_of": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "dataset_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "attribution": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [],
        "additionalProperties": true,
        "description": "Original oldest required fetch/dataset times preserved; unknown dates stay null. Served time does not refresh source age. Source cache_state hit/miss/refresh, is_cached, per-resource datasets[], attribution/limitations and separate SSIC reference labels retained."
      },
      "Company": {
        "type": "object",
        "properties": {
          "registration_number": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "name_local": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "name_english": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "company_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "registration_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "registration_date_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "registered_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "capital": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "record_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "previous_names": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "name_local": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "name",
                "name_local"
              ],
              "additionalProperties": false
            },
            "maxItems": 20
          },
          "activities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description_english": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description_local": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "user_description": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reference_label": {
                  "anyOf": [
                    {
                      "type": "object",
                      "additionalProperties": true
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [],
              "additionalProperties": false
            },
            "maxItems": 20
          },
          "selection_handle": {
            "type": "string",
            "maxLength": 4096
          }
        },
        "required": [
          "registration_number",
          "name"
        ],
        "additionalProperties": false
      },
      "RegistryCharge": {
        "type": "object",
        "properties": {
          "price_subunits": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647000
          },
          "reserved_subunits": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647000
          },
          "charged_subunits": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647000
          },
          "released_subunits": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647000
          },
          "restored_subunits": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647000
          },
          "price_credits": {
            "type": "number",
            "minimum": 0,
            "description": "Exact decimal JSON number emitted from checked S/1000 digits; use the companion exact string for arithmetic."
          },
          "price_credits_exact": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,3})?$"
          },
          "charged_credits": {
            "type": "number",
            "minimum": 0,
            "description": "Exact decimal JSON number emitted from checked S/1000 digits; use the companion exact string for arithmetic."
          },
          "charged_credits_exact": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,3})?$"
          }
        },
        "required": [
          "price_subunits",
          "reserved_subunits",
          "charged_subunits",
          "released_subunits",
          "restored_subunits",
          "price_credits",
          "price_credits_exact",
          "charged_credits",
          "charged_credits_exact"
        ],
        "additionalProperties": false,
        "description": "Initial search/lookup price250S=0.25, including successful no-match/cache hits. A is frozen accepted quote amount/version, not a proof-schema constant. Settlement consumes hold with no second debit. Failure releases A, restoring only original eligible epoch; restored may be zero. No screening count or premium tariff substitution."
      },
      "RegistryOperation": {
        "type": "object",
        "properties": {
          "operation_id": {
            "type": "string",
            "format": "uuid"
          },
          "provider_id": {
            "type": "string"
          },
          "source_id": {
            "type": "string",
            "enum": [
              "KH",
              "TH",
              "LA",
              "JP",
              "TW",
              "HK",
              "SGACRA"
            ]
          },
          "operation": {
            "type": "string",
            "enum": [
              "search",
              "lookup"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "result_ready",
              "completed",
              "failed",
              "incomplete"
            ]
          },
          "outcome": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "completed_match",
                  "completed_no_match",
                  "failed",
                  "incomplete"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "accepted_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{6}Z$"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{6}Z$"
              },
              {
                "type": "null"
              }
            ]
          },
          "result_expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "tariff_version": {
            "type": "string",
            "maxLength": 64,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
            "description": "Frozen accepted tariff schedule label, independently versioned from operation-proof schema v1 and ledger credit proof v2; not required to equal current config."
          },
          "credit_quantity_unit": {
            "const": "kyboa_subunit_v1"
          },
          "charge": {
            "$ref": "#/components/schemas/RegistryCharge"
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              },
              "result": {
                "type": "string"
              }
            },
            "required": [
              "self",
              "result"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "operation_id",
          "provider_id",
          "source_id",
          "operation",
          "state",
          "outcome",
          "error_code",
          "accepted_at",
          "completed_at",
          "result_expires_at",
          "tariff_version",
          "credit_quantity_unit",
          "charge",
          "links"
        ],
        "additionalProperties": false
      },
      "PaidLookup": {
        "type": "object",
        "properties": {
          "source_id": {
            "type": "string",
            "enum": [
              "KH",
              "TH",
              "LA",
              "JP",
              "TW",
              "HK",
              "SGACRA"
            ]
          },
          "registration_number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Trimmed source-specific exact identifier <=64bytes. HK uppercases. ACRA input is normalized uppercase by canonicalization; schema pattern describes canonical form."
          },
          "selection_handle": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "nocache": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "source_id"
        ],
        "additionalProperties": false,
        "oneOf": [
          {
            "required": [
              "registration_number"
            ],
            "not": {
              "required": [
                "selection_handle"
              ]
            }
          },
          {
            "required": [
              "selection_handle"
            ],
            "not": {
              "required": [
                "registration_number"
              ]
            }
          }
        ],
        "description": "Body<=16KiB. Exact source-specific identifier or paid selection bound to account/initiating user/channel/source/provider/name/generation and 15m expiry. Token ID is not bound; rotated same-user token can retry. Same-key recognized replay resolves stored work before selector expiry/config changes.",
        "allOf": [
          {
            "if": {
              "properties": {
                "source_id": {
                  "const": "KH"
                }
              },
              "required": [
                "source_id",
                "registration_number"
              ]
            },
            "then": {
              "properties": {
                "registration_number": {
                  "pattern": "^[0-9]{8}$"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "source_id": {
                  "const": "TH"
                }
              },
              "required": [
                "source_id",
                "registration_number"
              ]
            },
            "then": {
              "properties": {
                "registration_number": {
                  "pattern": "^[0-9]{13}$"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "source_id": {
                  "const": "LA"
                }
              },
              "required": [
                "source_id",
                "registration_number"
              ]
            },
            "then": {
              "properties": {
                "registration_number": {
                  "pattern": "^[A-Za-z0-9/-]{2,64}$"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "source_id": {
                  "const": "JP"
                }
              },
              "required": [
                "source_id",
                "registration_number"
              ]
            },
            "then": {
              "properties": {
                "registration_number": {
                  "pattern": "^[0-9]{13}$"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "source_id": {
                  "const": "TW"
                }
              },
              "required": [
                "source_id",
                "registration_number"
              ]
            },
            "then": {
              "properties": {
                "registration_number": {
                  "pattern": "^[0-9]{8}$"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "source_id": {
                  "const": "HK"
                }
              },
              "required": [
                "source_id",
                "registration_number"
              ]
            },
            "then": {
              "properties": {
                "registration_number": {
                  "pattern": "^[A-Za-z0-9]{6,12}$"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "source_id": {
                  "const": "SGACRA"
                }
              },
              "required": [
                "source_id",
                "registration_number"
              ]
            },
            "then": {
              "properties": {
                "registration_number": {
                  "pattern": "^(?:[0-9]{8,9}[A-Za-z]|[STst][0-9]{2}[A-Za-z]{2}[0-9]{4}[A-Za-z])$"
                }
              }
            }
          }
        ]
      },
      "PaidSearch": {
        "type": "object",
        "properties": {
          "source_id": {
            "type": "string",
            "enum": [
              "KH",
              "TH",
              "LA",
              "JP",
              "TW",
              "HK",
              "SGACRA"
            ]
          },
          "query": {
            "type": "string",
            "minLength": 2,
            "maxLength": 200,
            "description": "Trimmed UTF-8, no Unicode Cc/Cf controls. Source-specific identifier grammar and Taiwan Han rule apply. ACRA normalizes upper-case and recognizes UEN shape."
          },
          "search_type": {
            "type": "string",
            "enum": [
              "name",
              "registration_number"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20
          },
          "cursor": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096
          },
          "nocache": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "source_id",
          "query"
        ],
        "additionalProperties": false,
        "description": "Body<=16KiB. Source-specific name/identifier grammar applies. SGACRA name<=10, exact UEN fixed2; only generation/query/page-bound ACRA cursors. TW Chinese names or exact 8 digits, status fixed01. Each explicitly requested complete page is a new purchase. No arbitrary options/URL/provider."
      },
      "StoredReport": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "type": {
            "type": "string"
          },
          "format": {
            "const": "markdown"
          },
          "template_version": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "2.2",
                  "2.3"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "generated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "content": {
            "type": "string",
            "maxLength": 2097152,
            "x-max-utf8-bytes": 2097152
          },
          "content_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "screening_id": {
            "type": "integer",
            "minimum": 1
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string"
              }
            },
            "required": [
              "self"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "type",
          "format",
          "template_version",
          "content",
          "content_sha256",
          "screening_id",
          "generated_at",
          "links"
        ],
        "additionalProperties": true,
        "description": "Stored content bytes only, <=2MiB UTF-8 content/4MiB JSON response; company_v2_3->2.3, individual_v2_2->2.2, safe legacy types null. Screening resolved by owning account, then report through that relation. No supplier rerun/regeneration/PDF/raw artifacts."
      },
      "CompletedResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "individual",
              "company"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "completed",
              "completed_degraded"
            ]
          },
          "primary_subject": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "degraded": {
            "type": "boolean"
          },
          "risk_rating": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "screening_usage": {
            "type": "object"
          },
          "report": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "links": {
            "type": "object"
          },
          "risk_rating_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "confidence_level_label": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "primary_subject",
          "completed_at",
          "degraded",
          "risk_rating",
          "confidence_level",
          "screening_usage",
          "report",
          "links",
          "risk_rating_label",
          "confidence_level_label"
        ],
        "additionalProperties": true
      },
      "EntityDiscovery": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "maxItems": 100,
                "items": {
                  "$ref": "#/components/schemas/EntityListItem"
                }
              },
              "links": {
                "type": "object",
                "properties": {
                  "self": {
                    "type": "string",
                    "pattern": "^/api/v1/"
                  },
                  "next": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^/api/v1/"
                  },
                  "previous": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^/api/v1/"
                  }
                },
                "required": [
                  "self",
                  "next",
                  "previous"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "items",
              "links"
            ],
            "additionalProperties": false
          },
          "meta": {
            "$ref": "#/components/schemas/DiscoveryMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": false
      },
      "DiscoveryMeta": {
        "type": "object",
        "properties": {
          "api_version": {
            "const": "v1"
          },
          "request_id": {
            "type": "string",
            "maxLength": 128
          },
          "credit_representation": {
            "const": "kyboa_decimal_v1"
          },
          "credit_scale": {
            "const": 1000
          },
          "pagination": {
            "$ref": "#/components/schemas/DiscoveryPagination"
          }
        },
        "required": [
          "api_version",
          "request_id",
          "credit_representation",
          "credit_scale",
          "pagination"
        ],
        "additionalProperties": false
      },
      "DiscoveryPagination": {
        "type": "object",
        "properties": {
          "current_page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          },
          "per_page": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "last_page": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "current_page",
          "per_page",
          "total",
          "last_page"
        ],
        "additionalProperties": false
      },
      "EntityListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "entity_type": {
            "type": "string",
            "enum": [
              "company",
              "individual"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "archived"
            ]
          },
          "primary_name": {
            "type": "string"
          },
          "jurisdiction": {
            "type": [
              "string",
              "null"
            ]
          },
          "registration_number": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_screened_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "app_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string",
                "pattern": "^/api/v1/"
              },
              "screenings": {
                "type": "string",
                "pattern": "^/api/v1/"
              }
            },
            "required": [
              "self",
              "screenings"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "entity_type",
          "status",
          "primary_name",
          "jurisdiction",
          "registration_number",
          "created_at",
          "updated_at",
          "last_screened_at",
          "app_url",
          "links"
        ],
        "additionalProperties": false
      },
      "EntityCreate": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "enum": [
              "company",
              "individual"
            ]
          },
          "primary_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "jurisdiction": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "pattern": "^[A-Za-z]{2}$"
          },
          "registration_number": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "monitoring_frequency": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "hourly",
                  "daily",
                  "weekly",
                  "monthly",
                  "quarterly",
                  "annually"
                ],
                "description": "hourly/daily accepted only with features.entity_monitoring_test_frequencies; ordinary production values weekly/monthly/quarterly/annually"
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ]
          },
          "previous_registration_number": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_number": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "vat_number": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "license_number": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "entity_legal_form": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "registration_status": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "incorporation_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "dissolution_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "business_activities": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10000
              },
              {
                "type": "null"
              }
            ]
          },
          "date_of_birth_full": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "birth_year": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1000,
                "description": "No later than current Singapore year; agrees with DOB."
              },
              {
                "type": "null"
              }
            ]
          },
          "place_of_birth": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "passport_number": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "national_id_number": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "nationality": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2,
                "minLength": 2,
                "pattern": "^[A-Za-z]{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "citizenship": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2,
                "minLength": 2,
                "pattern": "^[A-Za-z]{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "gender": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "male",
                  "female",
                  "other",
                  "unknown"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "website": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048,
                "format": "uri",
                "pattern": "^[Hh][Tt][Tt][Pp][Ss]?://",
                "description": "HTTP(S) without credentials, whitespace or control characters; never fetched."
              },
              {
                "type": "null"
              }
            ]
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ]
          },
          "additional_names": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/NamedInput"
                },
                "maxItems": 20
              },
              {
                "type": "null"
              }
            ]
          },
          "addresses": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AddressInput"
                },
                "maxItems": 10
              },
              {
                "type": "null"
              }
            ]
          },
          "associated_people": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PersonInput"
                },
                "maxItems": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "corporate_shareholders": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CorporateInput"
                },
                "maxItems": 50
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "entity_type",
          "primary_name",
          "jurisdiction"
        ],
        "additionalProperties": {
          "$ref": "#/components/schemas/IgnoredEntityValue"
        },
        "description": "Body<=256KiB. Original minimal inputs preserved; harmless unknown root keys ignored, protected IDs/source/trust/risk/status/version/clocks rejected at every depth. Individual/company-only fields reject inappropriate presence including null. Nested keys closed. Real YYYY-MM-DD dates; DOB is not future in Singapore and agrees with birth_year. Incorporation/dissolution, address and role intervals are ordered. Duplicate children/IDs rejected before writer transaction. Ownership/UBO needs owner/shareholder; other role needs label. No global ownership sum, linked entities, registry fetch, automatic screening or fee.",
        "allOf": [
          {
            "if": {
              "properties": {
                "entity_type": {
                  "const": "company"
                }
              }
            },
            "then": {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "date_of_birth_full"
                    ]
                  },
                  {
                    "required": [
                      "birth_year"
                    ]
                  },
                  {
                    "required": [
                      "place_of_birth"
                    ]
                  },
                  {
                    "required": [
                      "passport_number"
                    ]
                  },
                  {
                    "required": [
                      "national_id_number"
                    ]
                  },
                  {
                    "required": [
                      "nationality"
                    ]
                  },
                  {
                    "required": [
                      "citizenship"
                    ]
                  },
                  {
                    "required": [
                      "gender"
                    ]
                  }
                ]
              }
            },
            "else": {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "previous_registration_number"
                    ]
                  },
                  {
                    "required": [
                      "tax_number"
                    ]
                  },
                  {
                    "required": [
                      "vat_number"
                    ]
                  },
                  {
                    "required": [
                      "license_number"
                    ]
                  },
                  {
                    "required": [
                      "entity_legal_form"
                    ]
                  },
                  {
                    "required": [
                      "registration_status"
                    ]
                  },
                  {
                    "required": [
                      "incorporation_date"
                    ]
                  },
                  {
                    "required": [
                      "dissolution_date"
                    ]
                  },
                  {
                    "required": [
                      "business_activities"
                    ]
                  },
                  {
                    "required": [
                      "associated_people"
                    ]
                  },
                  {
                    "required": [
                      "corporate_shareholders"
                    ]
                  }
                ]
              }
            }
          }
        ],
        "propertyNames": {
          "not": {
            "anyOf": [
              {
                "enum": [
                  "id",
                  "row_id",
                  "account_id",
                  "tenant_id",
                  "user_id",
                  "parent_id",
                  "entity_id",
                  "linked_entity_id",
                  "person_id",
                  "entity_person_id",
                  "created_by_user_id",
                  "updated_by_user_id",
                  "changed_by_user_id",
                  "token_id",
                  "screening_id",
                  "report_id",
                  "artifact_id",
                  "registry_artifact_id",
                  "source_type",
                  "source_ref",
                  "source_summary",
                  "source_id",
                  "source",
                  "provider",
                  "provider_id",
                  "provider_key",
                  "provider_evidence",
                  "registry_provider",
                  "registry_key",
                  "registry_source",
                  "risk",
                  "risk_rating",
                  "risk_score",
                  "risk_rationale",
                  "confidence",
                  "confidence_level",
                  "status",
                  "version",
                  "version_id",
                  "version_number",
                  "current_version",
                  "snapshot_json",
                  "change_source",
                  "change_reason",
                  "created_at",
                  "updated_at",
                  "deleted_at",
                  "last_screened_at",
                  "monitoring_last_run_at",
                  "next_monitoring_due_at",
                  "result",
                  "lookup_result",
                  "registry_result",
                  "registry_lookup_result",
                  "selection_handle",
                  "result_handle",
                  "lookup_handle",
                  "registry_result_handle",
                  "registry_lookup_handle",
                  "verified",
                  "is_verified",
                  "trusted",
                  "is_trusted",
                  "trusted_source",
                  "company_details",
                  "individual_details",
                  "contact_and_notes",
                  "additional_shareholders",
                  "related_entities"
                ]
              },
              {
                "pattern": "^(?:account|tenant|entity|person|parent|row|user|screening|report|token|artifact|version)(?:_[a-z]+)*_id$"
              }
            ]
          }
        }
      },
      "IgnoredEntityValue": {
        "description": "Original harmless unknown root values are ignored, with protected keys denied recursively even inside an ignored container.",
        "anyOf": [
          {
            "type": [
              "string",
              "number",
              "boolean",
              "null"
            ]
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IgnoredEntityValue"
            }
          },
          {
            "type": "object",
            "propertyNames": {
              "not": {
                "anyOf": [
                  {
                    "enum": [
                      "id",
                      "row_id",
                      "account_id",
                      "tenant_id",
                      "user_id",
                      "parent_id",
                      "entity_id",
                      "linked_entity_id",
                      "person_id",
                      "entity_person_id",
                      "created_by_user_id",
                      "updated_by_user_id",
                      "changed_by_user_id",
                      "token_id",
                      "screening_id",
                      "report_id",
                      "artifact_id",
                      "registry_artifact_id",
                      "source_type",
                      "source_ref",
                      "source_summary",
                      "source_id",
                      "source",
                      "provider",
                      "provider_id",
                      "provider_key",
                      "provider_evidence",
                      "registry_provider",
                      "registry_key",
                      "registry_source",
                      "risk",
                      "risk_rating",
                      "risk_score",
                      "risk_rationale",
                      "confidence",
                      "confidence_level",
                      "status",
                      "version",
                      "version_id",
                      "version_number",
                      "current_version",
                      "snapshot_json",
                      "change_source",
                      "change_reason",
                      "created_at",
                      "updated_at",
                      "deleted_at",
                      "last_screened_at",
                      "monitoring_last_run_at",
                      "next_monitoring_due_at",
                      "result",
                      "lookup_result",
                      "registry_result",
                      "registry_lookup_result",
                      "selection_handle",
                      "result_handle",
                      "lookup_handle",
                      "registry_result_handle",
                      "registry_lookup_handle",
                      "verified",
                      "is_verified",
                      "trusted",
                      "is_trusted",
                      "trusted_source"
                    ]
                  },
                  {
                    "pattern": "^(?:account|tenant|entity|person|parent|row|user|screening|report|token|artifact|version)(?:_[a-z]+)*_id$"
                  }
                ]
              }
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/IgnoredEntityValue"
            }
          }
        ]
      },
      "CorporateInput": {
        "type": "object",
        "properties": {
          "primary_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "registration_number": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "jurisdiction": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2,
                "minLength": 2,
                "pattern": "^[A-Za-z]{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "ownership_percent": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?:0*[0-9]{1,2}(?:\\.[0-9]{1,4})?|0*100(?:\\.0{1,4})?)$",
                "description": "Exact decimal string, 0..100, at most four fractional places; never a JSON float."
              },
              {
                "type": "null"
              }
            ]
          },
          "is_screening_enabled": {
            "type": "boolean"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "primary_name"
        ],
        "additionalProperties": false
      },
      "PersonInput": {
        "type": "object",
        "properties": {
          "primary_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "date_of_birth_full": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "birth_year": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1000,
                "description": "No later than current Singapore year; agrees with DOB."
              },
              {
                "type": "null"
              }
            ]
          },
          "place_of_birth": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "passport_number": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "national_id_number": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "nationality": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2,
                "minLength": 2,
                "pattern": "^[A-Za-z]{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "citizenship": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2,
                "minLength": 2,
                "pattern": "^[A-Za-z]{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "gender": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "male",
                  "female",
                  "other",
                  "unknown"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "address_text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ]
          },
          "ownership_percent": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^(?:0*[0-9]{1,2}(?:\\.[0-9]{1,4})?|0*100(?:\\.0{1,4})?)$",
                "description": "Exact decimal string, 0..100, at most four fractional places; never a JSON float."
              },
              {
                "type": "null"
              }
            ]
          },
          "is_ubo": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_screening_enabled": {
            "type": "boolean"
          },
          "names": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PersonNameInput"
                },
                "maxItems": 10
              },
              {
                "type": "null"
              }
            ]
          },
          "roles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoleInput"
            },
            "maxItems": 10,
            "minItems": 1
          }
        },
        "required": [
          "primary_name",
          "roles"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "anyOf": [
                {
                  "required": [
                    "ownership_percent"
                  ],
                  "properties": {
                    "ownership_percent": {
                      "type": "string"
                    }
                  }
                },
                {
                  "required": [
                    "is_ubo"
                  ],
                  "properties": {
                    "is_ubo": {
                      "const": true
                    }
                  }
                }
              ]
            },
            "then": {
              "properties": {
                "roles": {
                  "contains": {
                    "properties": {
                      "role_type": {
                        "enum": [
                          "owner",
                          "shareholder"
                        ]
                      }
                    },
                    "required": [
                      "role_type"
                    ]
                  },
                  "minContains": 1
                }
              }
            }
          }
        ]
      },
      "RoleInput": {
        "type": "object",
        "properties": {
          "role_type": {
            "type": "string",
            "enum": [
              "director",
              "officer",
              "owner",
              "shareholder",
              "other"
            ]
          },
          "label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "appointment_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "cessation_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "role_type"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "role_type": {
                  "const": "other"
                }
              },
              "required": [
                "role_type"
              ]
            },
            "then": {
              "required": [
                "label"
              ],
              "properties": {
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                }
              }
            }
          }
        ]
      },
      "PersonNameInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "name_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "alias",
                  "translated_name",
                  "local_name",
                  "previous_name"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "language_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 35,
                "minLength": 2,
                "pattern": "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "AddressInput": {
        "type": "object",
        "properties": {
          "full_address": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "address_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "registered",
                  "physical",
                  "mailing",
                  "residential",
                  "business",
                  "historic"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "street_line_1": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "street_line_2": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "locality": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "region": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 32
              },
              {
                "type": "null"
              }
            ]
          },
          "country_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2,
                "minLength": 2,
                "pattern": "^[A-Za-z]{2}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_primary": {
            "type": "boolean"
          },
          "start_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          },
          "end_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "full_address"
        ],
        "additionalProperties": false
      },
      "NamedInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "name_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "trading_name",
                  "previous_name",
                  "translated_name",
                  "local_registered_name",
                  "local_name",
                  "alias"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "language_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 35,
                "minLength": 2,
                "pattern": "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "EntityCheck": {
        "type": "object",
        "properties": {
          "entity_type": {
            "type": "string",
            "enum": [
              "individual",
              "company"
            ]
          },
          "primary_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "jurisdiction": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "pattern": "^[A-Za-z]{2}$"
          },
          "registration_number": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "entity_type",
          "primary_name",
          "jurisdiction"
        ],
        "additionalProperties": true
      },
      "ScreeningDiscovery": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "maxItems": 100,
                "items": {
                  "$ref": "#/components/schemas/ScreeningListItem"
                }
              },
              "links": {
                "type": "object",
                "properties": {
                  "self": {
                    "type": "string",
                    "pattern": "^/api/v1/"
                  },
                  "next": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^/api/v1/"
                  },
                  "previous": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "pattern": "^/api/v1/"
                  }
                },
                "required": [
                  "self",
                  "next",
                  "previous"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "items",
              "links"
            ],
            "additionalProperties": false
          },
          "meta": {
            "$ref": "#/components/schemas/DiscoveryMeta"
          }
        },
        "required": [
          "data",
          "meta"
        ],
        "additionalProperties": false
      },
      "ScreeningListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "individual",
              "company"
            ]
          },
          "trigger_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "quick",
              "entity_manual",
              "entity_monitoring",
              null
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "waiting",
              "completed",
              "completed_degraded",
              "failed"
            ]
          },
          "entity_id": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "primary_subject": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "individual",
                      "company",
                      null
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "jurisdiction": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "type",
                  "name",
                  "jurisdiction"
                ],
                "additionalProperties": false
              }
            ]
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "risk_rating": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "low",
              "medium",
              "high",
              "very_high",
              null
            ]
          },
          "confidence_level": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "high",
              "medium",
              "low",
              null
            ]
          },
          "app_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "string",
                "pattern": "^/api/v1/"
              },
              "result": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^/api/v1/"
              }
            },
            "required": [
              "self",
              "result"
            ],
            "additionalProperties": false
          },
          "report": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "links": {
                    "type": "object",
                    "properties": {
                      "self": {
                        "type": "string",
                        "pattern": "^/api/v1/"
                      }
                    },
                    "required": [
                      "self"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "links"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "id",
          "type",
          "trigger_type",
          "status",
          "entity_id",
          "primary_subject",
          "created_at",
          "started_at",
          "completed_at",
          "risk_rating",
          "confidence_level",
          "app_url",
          "links",
          "report"
        ],
        "additionalProperties": false
      },
      "ScreeningCreate": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "individual",
              "company"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "jurisdiction": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "pattern": "^[A-Za-z]{2}$"
          }
        },
        "required": [
          "type",
          "name",
          "jurisdiction"
        ],
        "additionalProperties": true
      }
    },
    "examples": {
      "ExpiredPaidPayload": {
        "summary": "HTTP410; same immutable receipt, never a new fee or refetch",
        "value": {
          "error": {
            "code": "RESULT_EXPIRED",
            "message": "The registry request could not be completed.",
            "details": {
              "operation_id": "62220f75-6740-4dd6-b33e-be1fd49642b6",
              "source_id": "HK",
              "provider_id": "hk_cr",
              "operation": "lookup",
              "state": "completed",
              "outcome": "completed_no_match",
              "error_code": null,
              "accepted_at": "2026-11-02T10:00:00.000000Z",
              "completed_at": "2026-11-02T10:00:02.000000Z",
              "result_expires_at": "2026-12-02T10:00:02+00:00",
              "tariff_version": "registry_api_v1",
              "credit_quantity_unit": "kyboa_subunit_v1",
              "charge": {
                "price_subunits": 250,
                "price_credits": 0.25,
                "price_credits_exact": "0.25",
                "reserved_subunits": 250,
                "charged_subunits": 250,
                "charged_credits": 0.25,
                "charged_credits_exact": "0.25",
                "released_subunits": 0,
                "restored_subunits": 0
              },
              "links": {
                "self": "/api/v1/registry/operations/62220f75-6740-4dd6-b33e-be1fd49642b6",
                "result": "/api/v1/registry/operations/62220f75-6740-4dd6-b33e-be1fd49642b6/result"
              }
            }
          },
          "meta": {
            "api_version": "v1",
            "request_id": "phase14-example-01",
            "credit_representation": "kyboa_decimal_v1",
            "credit_scale": 1000
          }
        }
      },
      "SavedNoMatchResult": {
        "summary": "Illustrative bounded authoritative no-match using earlier shared fetch; no registry-wide absence claim",
        "value": {
          "data": {
            "operation_id": "62220f75-6740-4dd6-b33e-be1fd49642b6",
            "source_id": "HK",
            "provider_id": "hk_cr",
            "operation": "lookup",
            "state": "completed",
            "outcome": "completed_no_match",
            "error_code": null,
            "accepted_at": "2026-11-02T10:00:00.000000Z",
            "completed_at": "2026-11-02T10:00:02.000000Z",
            "result_expires_at": "2026-12-02T10:00:02+00:00",
            "tariff_version": "registry_api_v1",
            "credit_quantity_unit": "kyboa_subunit_v1",
            "charge": {
              "price_subunits": 250,
              "price_credits": 0.25,
              "price_credits_exact": "0.25",
              "reserved_subunits": 250,
              "charged_subunits": 250,
              "charged_credits": 0.25,
              "charged_credits_exact": "0.25",
              "released_subunits": 0,
              "restored_subunits": 0
            },
            "links": {
              "self": "/api/v1/registry/operations/62220f75-6740-4dd6-b33e-be1fd49642b6",
              "result": "/api/v1/registry/operations/62220f75-6740-4dd6-b33e-be1fd49642b6/result"
            },
            "result": {
              "company": null,
              "matches": [],
              "people": [],
              "shareholders": [],
              "provenance": {
                "source_id": "HK",
                "provider_id": "hk_cr",
                "source_name": "Hong Kong registry",
                "jurisdiction": "HK",
                "capability": "partial",
                "source_url": "https://data.gov.hk/en-data/dataset/hk-cr-crdata-list-addr",
                "source_record_url": null,
                "source_terms_url": null,
                "retrieved_at": "2026-11-02T09:59:58+00:00",
                "served_at": "2026-11-02T10:00:02+00:00",
                "is_cached": true,
                "cache_state": "hit",
                "source_data_as_of": null,
                "dataset_version": null,
                "datasets": [],
                "attribution": "Hong Kong registry",
                "limitations": [
                  "Registry coverage is partial; unavailable fields do not establish absence."
                ]
              }
            }
          },
          "meta": {
            "api_version": "v1",
            "request_id": "phase14-example-01",
            "credit_representation": "kyboa_decimal_v1",
            "credit_scale": 1000
          }
        }
      },
      "FailureIneligibleEpoch": {
        "summary": "Changed revision/expired same-epoch Trial/superseded period; release250 restore0",
        "value": {
          "data": {
            "operation_id": "62220f75-6740-4dd6-b33e-be1fd49642b6",
            "source_id": "HK",
            "provider_id": "hk_cr",
            "operation": "lookup",
            "state": "failed",
            "outcome": "failed",
            "error_code": "SOURCE_FAILED",
            "accepted_at": "2026-11-02T10:00:00.000000Z",
            "completed_at": "2026-11-02T10:00:02.000000Z",
            "result_expires_at": "2026-12-02T10:00:02+00:00",
            "tariff_version": "registry_api_v1",
            "credit_quantity_unit": "kyboa_subunit_v1",
            "charge": {
              "price_subunits": 250,
              "price_credits": 0.25,
              "price_credits_exact": "0.25",
              "reserved_subunits": 250,
              "charged_subunits": 0,
              "charged_credits": 0,
              "charged_credits_exact": "0",
              "released_subunits": 250,
              "restored_subunits": 0
            },
            "links": {
              "self": "/api/v1/registry/operations/62220f75-6740-4dd6-b33e-be1fd49642b6",
              "result": "/api/v1/registry/operations/62220f75-6740-4dd6-b33e-be1fd49642b6/result"
            }
          },
          "meta": {
            "api_version": "v1",
            "request_id": "phase14-example-01",
            "credit_representation": "kyboa_decimal_v1",
            "credit_scale": 1000
          }
        }
      },
      "FailureCurrentEpoch": {
        "summary": "Valid original eligible epoch; reserve250 release250 restore250, no fee",
        "value": {
          "data": {
            "operation_id": "62220f75-6740-4dd6-b33e-be1fd49642b6",
            "source_id": "HK",
            "provider_id": "hk_cr",
            "operation": "lookup",
            "state": "failed",
            "outcome": "failed",
            "error_code": "SOURCE_FAILED",
            "accepted_at": "2026-11-02T10:00:00.000000Z",
            "completed_at": "2026-11-02T10:00:02.000000Z",
            "result_expires_at": "2026-12-02T10:00:02+00:00",
            "tariff_version": "registry_api_v1",
            "credit_quantity_unit": "kyboa_subunit_v1",
            "charge": {
              "price_subunits": 250,
              "price_credits": 0.25,
              "price_credits_exact": "0.25",
              "reserved_subunits": 250,
              "charged_subunits": 0,
              "charged_credits": 0,
              "charged_credits_exact": "0",
              "released_subunits": 250,
              "restored_subunits": 250
            },
            "links": {
              "self": "/api/v1/registry/operations/62220f75-6740-4dd6-b33e-be1fd49642b6",
              "result": "/api/v1/registry/operations/62220f75-6740-4dd6-b33e-be1fd49642b6/result"
            }
          },
          "meta": {
            "api_version": "v1",
            "request_id": "phase14-example-01",
            "credit_representation": "kyboa_decimal_v1",
            "credit_scale": 1000
          }
        }
      },
      "CompletedNoMatchReceipt": {
        "summary": "Illustrative receipt, not a claim about this identifier; success costs250S",
        "value": {
          "data": {
            "operation_id": "62220f75-6740-4dd6-b33e-be1fd49642b6",
            "source_id": "HK",
            "provider_id": "hk_cr",
            "operation": "lookup",
            "state": "completed",
            "outcome": "completed_no_match",
            "error_code": null,
            "accepted_at": "2026-11-02T10:00:00.000000Z",
            "completed_at": "2026-11-02T10:00:02.000000Z",
            "result_expires_at": "2026-12-02T10:00:02+00:00",
            "tariff_version": "registry_api_v1",
            "credit_quantity_unit": "kyboa_subunit_v1",
            "charge": {
              "price_subunits": 250,
              "price_credits": 0.25,
              "price_credits_exact": "0.25",
              "reserved_subunits": 250,
              "charged_subunits": 250,
              "charged_credits": 0.25,
              "charged_credits_exact": "0.25",
              "released_subunits": 0,
              "restored_subunits": 0
            },
            "links": {
              "self": "/api/v1/registry/operations/62220f75-6740-4dd6-b33e-be1fd49642b6",
              "result": "/api/v1/registry/operations/62220f75-6740-4dd6-b33e-be1fd49642b6/result"
            }
          },
          "meta": {
            "api_version": "v1",
            "request_id": "phase14-example-01",
            "credit_representation": "kyboa_decimal_v1",
            "credit_scale": 1000
          }
        }
      },
      "PaidLookupRequest": {
        "value": {
          "source_id": "HK",
          "registration_number": "12345678"
        }
      },
      "CanonicalConflict": {
        "value": {
          "error": {
            "code": "IDEMPOTENCY_CONFLICT",
            "message": "The registry request could not be completed.",
            "details": {}
          },
          "meta": {
            "api_version": "v1",
            "request_id": "phase14-example-01",
            "credit_representation": "kyboa_decimal_v1",
            "credit_scale": 1000
          }
        }
      },
      "InsufficientFraction": {
        "value": {
          "error": {
            "code": "INSUFFICIENT_CREDITS",
            "message": "Insufficient spendable credits.",
            "details": {
              "required_subunits": 250,
              "available_subunits": 249,
              "required_credits": 0.25,
              "required_credits_exact": "0.25",
              "available_credits": 0.249,
              "available_credits_exact": "0.249"
            }
          },
          "meta": {
            "api_version": "v1",
            "request_id": "phase14-example-01",
            "credit_representation": "kyboa_decimal_v1",
            "credit_scale": 1000
          }
        }
      },
      "PaidSearchRequest": {
        "value": {
          "source_id": "HK",
          "query": "Example Company",
          "limit": 5
        }
      },
      "StoredReport": {
        "value": {
          "data": {
            "screening_id": 1001,
            "id": 3001,
            "type": "company_v2_3",
            "format": "markdown",
            "generated_at": "2026-11-02T10:00:02+00:00",
            "template_version": "2.3",
            "links": {
              "self": "/api/v1/screenings/1001/reports/3001"
            },
            "content": "# Stored report example\n\nNot available\n",
            "content_sha256": "aab9b8e23849a70a1734c4b6ee2b1f4d06afeaad7388520c8ae4a5fe571620bd"
          },
          "meta": {
            "api_version": "v1",
            "request_id": "phase14-example-01",
            "credit_representation": "kyboa_decimal_v1",
            "credit_scale": 1000
          }
        },
        "summary": "Illustrative saved content fragment/hash; real endpoint returns the entire original stored report, preserving every section."
      },
      "FindEntities": {
        "summary": "Free stored compact discovery; choose relevant IDs before following links.",
        "value": {
          "data": {
            "items": [
              {
                "id": 8,
                "entity_type": "company",
                "status": "archived",
                "primary_name": "Example company",
                "jurisdiction": "SG",
                "registration_number": "202000001A",
                "created_at": "2026-11-01T00:00:00+00:00",
                "updated_at": "2026-11-02T00:00:00+00:00",
                "last_screened_at": null,
                "app_url": null,
                "links": {
                  "self": "/api/v1/entities/8",
                  "screenings": "/api/v1/entities/8/screenings"
                }
              }
            ],
            "links": {
              "self": "/api/v1/entities?page=1&per_page=25",
              "next": null,
              "previous": null
            }
          },
          "meta": {
            "api_version": "v1",
            "request_id": "discovery-example-147",
            "credit_representation": "kyboa_decimal_v1",
            "credit_scale": 1000,
            "pagination": {
              "current_page": 1,
              "per_page": 25,
              "total": 1,
              "last_page": 1
            }
          }
        }
      },
      "RichEntityRequest": {
        "summary": "Supplied company; later explicit screening has three logical parties, aliases free",
        "value": {
          "entity_type": "company",
          "primary_name": "Supplied Example Company",
          "jurisdiction": "HK",
          "registration_number": "12345678",
          "website": "https://example.invalid/company",
          "email": "compliance@example.invalid",
          "phone": "+852 0000 0000",
          "incorporation_date": "2020-01-15",
          "additional_names": [
            {
              "name": "Supplied Example Alias",
              "name_type": "alias",
              "language_code": "en"
            }
          ],
          "addresses": [
            {
              "full_address": "Example business address supplied by client",
              "country_code": "HK",
              "address_type": "registered",
              "is_primary": true
            }
          ],
          "associated_people": [
            {
              "primary_name": "Supplied Example Person",
              "names": [
                {
                  "name": "Supplied Person Alias",
                  "name_type": "alias"
                }
              ],
              "roles": [
                {
                  "role_type": "director"
                },
                {
                  "role_type": "owner"
                }
              ],
              "ownership_percent": "40",
              "is_screening_enabled": true
            }
          ],
          "corporate_shareholders": [
            {
              "primary_name": "Supplied Parent Company",
              "jurisdiction": "HK",
              "ownership_percent": "50",
              "is_screening_enabled": true
            }
          ],
          "notes": "Client supplied; no registry request or automatic screening."
        }
      },
      "NestedEntity422": {
        "value": {
          "error": {
            "code": "VALIDATION_ERROR",
            "message": "The given data was invalid.",
            "details": {
              "errors": {
                "associated_people.0.roles.0.role_type": [
                  "The selected role type is invalid."
                ]
              }
            }
          },
          "meta": {
            "api_version": "v1",
            "request_id": "phase14-example-01",
            "credit_representation": "kyboa_decimal_v1",
            "credit_scale": 1000
          }
        }
      },
      "FindScreenings": {
        "summary": "Free stored compact discovery; choose relevant IDs before following links.",
        "value": {
          "data": {
            "items": [
              {
                "id": 54,
                "type": "company",
                "trigger_type": "entity_manual",
                "status": "completed_degraded",
                "entity_id": 8,
                "primary_subject": {
                  "id": 100,
                  "type": "company",
                  "name": "Example company",
                  "jurisdiction": "SG"
                },
                "created_at": "2026-11-01T00:00:00+00:00",
                "started_at": "2026-11-01T00:01:00+00:00",
                "completed_at": "2026-11-01T00:02:00+00:00",
                "risk_rating": null,
                "confidence_level": null,
                "app_url": null,
                "links": {
                  "self": "/api/v1/screenings/54",
                  "result": "/api/v1/screenings/54/result"
                },
                "report": {
                  "id": 43,
                  "links": {
                    "self": "/api/v1/screenings/54/reports/43"
                  }
                }
              }
            ],
            "links": {
              "self": "/api/v1/screenings?entity_id=8&page=1&per_page=25",
              "next": null,
              "previous": null
            }
          },
          "meta": {
            "api_version": "v1",
            "request_id": "discovery-example-147",
            "credit_representation": "kyboa_decimal_v1",
            "credit_scale": 1000,
            "pagination": {
              "current_page": 1,
              "per_page": 25,
              "total": 1,
              "last_page": 1
            }
          }
        }
      }
    },
    "securitySchemes": {
      "CustomerFull": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Sanctum full-access customer token",
        "description": "api_user, activation/status, global API entitlement, account/lifecycle and internal route checks remain. Recognized full sets expand automatically in place; no regeneration."
      }
    }
  }
}
